Not encoding '+' in URLs anymore breaks backwards compatibility with apps running on spring 4 [SPR-17474] #22006
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: duplicate
A duplicate of another issue
Jean-Pierre Bergamin opened SPR-17474 and commented
We upgraded some of our apps from spring boot 1.5.x to 2 and therefore to spring 5.x. We now have backward compatibility issues of http clients running with spring 5 and web services running with spring 4 because the + in query params on the client side is not encoded anymore. Services still running with Spring 4.x replace the + now with a space and therefore those query params are now broken on the server side (e.g. with this URL: http://example.com?when=2007-08-31T16:47+02:00). I'm also pretty sure that many other web frameworks besides spring 4 blindly replace a + with a space being in a query param or not and therefore see invalid query params sent from spring 5 clients now. So IMHO the change in behaviour here is dangerous and not really necessary because a + that is encoded with %2b will be properly handled by any web framework.
This change has been introduced here f2e293a because of #19394
Affects: 5.0.10
Issue Links:
The text was updated successfully, but these errors were encountered: