Closed resmo closed 9 months ago
reproducer https://github.com/resmo/spring-boot-3.2.3-demo-htmx-umlauts
The issue only shows up in 3.2.3 with this htmx-spring-boot
.
seems the issue does no show if the browser content language is set to "english". I tested with german or german (switzerland)
it seems related to spring framework 6.1.4 (not spring boot). But the thing is, I only see it using htmx-spring-boot, not "normal" thymeleaf responses and mentioned before, if accept language header is de (!= en).
Do you have a clue?
Could you please provide the request and response headers for both the direct request and the htmx request!
Could you please provide the request and response headers for both the direct request and the htmx request!
request
GET /umlauts2 HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0
Accept: */*
Accept-Language: de-CH,de;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate, br
HX-Request: true
HX-Current-URL: http://localhost:8080/
DNT: 1
Connection: keep-alive
Referer: http://localhost:8080/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
Pragma: no-cache
Cache-Control: no-cache
response
HTTP/1.1 200
Content-Type: text/html;charset=UTF-8
Content-Language: de-CH
Content-Length: 51
Date: Mon, 26 Feb 2024 16:31:44 GMT
Keep-Alive: timeout=60
Connection: keep-alive
GET /umlauts2 HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0
Accept: */*
Accept-Language: de-CH,de;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate, br
HX-Request: true
HX-Current-URL: http://localhost:8080/
DNT: 1
Connection: keep-alive
Referer: http://localhost:8080/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
Pragma: no-cache
Cache-Control: no-cache
response
HTTP/1.1 200
Content-Type: text/html;charset=UTF-8
Content-Language: de-CH
Content-Length: 48
Date: Mon, 26 Feb 2024 16:34:06 GMT
Keep-Alive: timeout=60
Connection: keep-alive
request
GET / HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: de-CH,de;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate, br
DNT: 1
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: cross-site
Pragma: no-cache
Cache-Control: no-cache
response
HTTP/1.1 200
Content-Type: text/html;charset=UTF-8
Content-Language: de-CH
Transfer-Encoding: chunked
Date: Mon, 26 Feb 2024 16:41:43 GMT
Keep-Alive: timeout=60
Connection: keep-alive
request
GET / HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: de-CH,de;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate, br
DNT: 1
Connection: keep-alive
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: cross-site
Pragma: no-cache
Cache-Control: no-cache
response
HTTP/1.1 200
Content-Type: text/html;charset=UTF-8
Content-Language: de-CH
Transfer-Encoding: chunked
Date: Mon, 26 Feb 2024 16:34:06 GMT
Keep-Alive: timeout=60
Connection: keep-alive
there is currently a analysis of a regression going on in https://github.com/spring-projects/spring-framework/issues/32317 which might be related
We've pushed a fix for Spring Framework 6.1.x.
See https://github.com/spring-projects/spring-framework/issues/32317#issuecomment-1964819639 for details.
closing, the fix pushed Spring Framework 6.1.x. worked for me!
Summary
I am experiencing an issue I only see with htmx responses that is why I open the issue here, but it might be a spring boot 3.2.3 issue.
After switching form spring boot 3.2.2 to 3.2.3 I see broken "umlauts".
Response header looks fine, content "looks" identical but the weird thing is that the content length is different, off by 1 B (3.2.3 has -1 B). Unsure if this is the issue.
Spring Boot
3.2.3
Details
3.2.3
3.2.2