diff --git a/scm-ui/src/repos/sources/components/content/SourcecodeViewer.js b/scm-ui/src/repos/sources/components/content/SourcecodeViewer.js index 648c99d29a..d679c3be3d 100644 --- a/scm-ui/src/repos/sources/components/content/SourcecodeViewer.js +++ b/scm-ui/src/repos/sources/components/content/SourcecodeViewer.js @@ -111,7 +111,7 @@ export function getProgrammingLanguage(url: string) { return apiClient .head(url) .then(response => { - return { language: response.headers.get("Language") }; + return { language: response.headers.get("X-Programming-Language") }; }) .catch(err => { return { error: err }; diff --git a/scm-ui/src/repos/sources/components/content/SourcecodeViewer.test.js b/scm-ui/src/repos/sources/components/content/SourcecodeViewer.test.js index b132721e3b..68c9cba00a 100644 --- a/scm-ui/src/repos/sources/components/content/SourcecodeViewer.test.js +++ b/scm-ui/src/repos/sources/components/content/SourcecodeViewer.test.js @@ -25,7 +25,7 @@ describe("get content", () => { it("should return language", done => { let headers = { - Language: "JAVA" + "X-Programming-Language": "JAVA" }; fetchMock.head("/api/v2" + CONTENT_URL, {