Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: Release 1.5.1, Release 1.5.2, Release 1.5.3
-
Fix Version/s: Release 1.5.4
-
Component/s: ActionBean Dispatching
-
Labels:None
Description
Version 1.5.1 includes a change in the way parameters for a clean URL are parsed. Due to this change, the character + is no longer decoded to space as it should be (UrlBuilder generates these URLs).
Example for an actionbean bound to /action/hello/{name}:
version: URI => value of parameter name
v 1.5: /action/hello/John+Smith => John Smith
v 1.5: /action/hello/John%20Smith => John Smith
v 1.5.1+: /action/hello/John+Smith => John+Smith
v 1.5.1+: /action/hello/John%20Smith => John Smith
The incompatibility was introduced in UrlBindingFactory, by changing from trimContextPath to HttpUtil.getRequestedPath:
public UrlBinding getBindingPrototype(HttpServletRequest request) { // return getBindingPrototype(trimContextPath(request)); return getBindingPrototype(HttpUtil.getRequestedPath(request)); }
public UrlBinding getBinding(HttpServletRequest request) { // return getBinding(trimContextPath(request)); return getBinding(HttpUtil.getRequestedPath(request)); }
I've updated HttpUtil.getRequestedPath to decode the path before returning it. This is fixed for 1.5.4.