From e67f68c364da6ca231c6fe149a3773dd8ea1faaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maren=20S=C3=BCwer?= Date: Mon, 29 Oct 2018 15:27:21 +0100 Subject: [PATCH] use correct header --- scm-ui/src/repos/sources/components/content/SourcecodeViewer.js | 2 +- .../repos/sources/components/content/SourcecodeViewer.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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, {