Stripes

plus sign in clean URL parameters not decoded since 1.5.1

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major 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)); }

Activity

Hide
Ben Gunter added a comment - 18/May/10 12:25 PM

I've updated HttpUtil.getRequestedPath to decode the path before returning it. This is fixed for 1.5.4.

Show
Ben Gunter added a comment - 18/May/10 12:25 PM I've updated HttpUtil.getRequestedPath to decode the path before returning it. This is fixed for 1.5.4.

People

Vote (0)
Watch (1)

Dates

  • Created:
    13/Mar/10 11:31 AM
    Updated:
    04/Jan/11 1:29 PM
    Resolved:
    18/May/10 12:25 PM