Skip to content

Commit

Permalink
Bump org.apache.tomcat.embed:tomcat-embed-core from 10.1.30 to 11.0.0 (
Browse files Browse the repository at this point in the history
…#1146)

* Bump org.apache.tomcat.embed:tomcat-embed-core from 10.1.30 to 11.0.0

Bumps org.apache.tomcat.embed:tomcat-embed-core from 10.1.30 to 11.0.0.

---
updated-dependencies:
- dependency-name: org.apache.tomcat.embed:tomcat-embed-core
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix tomcat

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
  • Loading branch information
dependabot[bot] and zeitlinger authored Oct 16, 2024
1 parent c9ff46b commit 0f32c67
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>10.1.30</version>
<version>11.0.0</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>10.1.30</version>
<version>11.0.0</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion examples/example-exporter-servlet-tomcat/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>10.1.30</version>
<version>11.0.0</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>10.1.30</version>
<version>11.0.0</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ public void testErrorHandling() throws IOException {
assertThat(new String(response.body, UTF_8)).contains("Simulating an error.");
}

protected boolean headReturnsContentLength() {
return true;
}

@Test
public void testHeadRequest() throws IOException {
sampleAppContainer
Expand All @@ -186,7 +190,11 @@ public void testHeadRequest() throws IOException {
assertThat(size > 0).isTrue();
Response headResponse = scrape("HEAD", "");
assertThat(headResponse.status).isEqualTo(200);
assertThat(headResponse.getHeader("Content-Length")).isEqualTo(Integer.toString(size));
if (headReturnsContentLength()) {
assertThat(headResponse.getHeader("Content-Length")).isEqualTo(Integer.toString(size));
} else {
assertThat(headResponse.getHeader("Content-Length")).isNull();
}
assertThat(headResponse.body.length).isZero();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,11 @@ class TomcatIT extends ExporterIT {
public TomcatIT() throws IOException, URISyntaxException {
super("exporter-servlet-tomcat-sample");
}

@Override
protected boolean headReturnsContentLength() {
// not any more since
// https://tomcat.apache.org/tomcat-11.0-doc/changelog.html#Tomcat_11.0.0-M3_(markt)
return false;
}
}

0 comments on commit 0f32c67

Please sign in to comment.