Skip to content

fix(wfs): keep GeoServer Content-Type off Spring's parser - #28

Merged
fjlopez merged 2 commits into
devfrom
fix/wfs-content-type
Oct 20, 2026
Merged

fjlopez merged 2 commits into
devfrom
fix/wfs-content-type

Conversation

@fjlopez

@fjlopez fjlopez commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • GeoServer Content-Type: text/xml; subtype=gml/2.1.2 no longer becomes a 500 when Spring 7 parses the header while writing the proxied body.
  • The response keeps that upstream string. Spring reads a separate parseable value.

Test plan

  • ./gradlew test --tests org.sitmun.proxy.middleware.service.UpstreamContentTypeFilterTest
  • ./gradlew spotlessCheck
  • Local GET /middleware/proxy/12/4/WFS/9401/9401 returned 200 with Content-Type: text/xml; subtype=gml/2.1.2

Spring 7 re-reads the servlet Content-Type while writing the body. A slash in subtype=gml/2.1.2 became a 500. The response header stays the upstream string.
Mime4j parses the upstream header. Spring sees text/xml and any parameter it can parse. The response keeps the original string.
@fjlopez
fjlopez merged commit d9e78ea into dev Oct 20, 2026
3 checks passed
@fjlopez
fjlopez deleted the fix/wfs-content-type branch October 20, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant