Skip to content

Commit c527647

Browse files
committed
tomcat fixed headers
Signed-off-by: Gregor Zeitlinger <[email protected]>
1 parent 31b6bd5 commit c527647

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

integration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/ExporterIT.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,6 @@ public void testErrorHandling() throws IOException {
142142
assertThat(response.stringBody()).contains("Simulating an error.");
143143
}
144144

145-
protected boolean headReturnsContentLength() {
146-
return true;
147-
}
148-
149145
@Test
150146
public void testHeadRequest() throws IOException {
151147
start();
@@ -154,11 +150,7 @@ public void testHeadRequest() throws IOException {
154150
assertThat(size).isGreaterThan(0);
155151
Response headResponse = scrape("HEAD", "");
156152
assertThat(headResponse.status).isEqualTo(200);
157-
if (headReturnsContentLength()) {
158-
assertThat(headResponse.getHeader("Content-Length")).isEqualTo(Integer.toString(size));
159-
} else {
160-
assertThat(headResponse.getHeader("Content-Length")).isNull();
161-
}
153+
assertThat(headResponse.getHeader("Content-Length")).isEqualTo(Integer.toString(size));
162154
assertThat(headResponse.body).isEmpty();
163155
}
164156

integration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/TomcatIT.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,4 @@ class TomcatIT extends ExporterIT {
77
public TomcatIT() throws IOException, URISyntaxException {
88
super("exporter-servlet-tomcat-sample");
99
}
10-
11-
@Override
12-
protected boolean headReturnsContentLength() {
13-
// not any more since
14-
// https://tomcat.apache.org/tomcat-11.0-doc/changelog.html#Tomcat_11.0.0-M3_(markt)
15-
return false;
16-
}
1710
}

0 commit comments

Comments
 (0)