Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users
uri_for() corrupts query parameters hash for caller
 

Index | Next | Previous | View Flat


Byron.Young at riverbed

Jun 12, 2009, 2:43 PM


Views: 1073
Permalink
uri_for() corrupts query parameters hash for caller

Hey everybody,

I ran into an issue at $work where we keep passing the same $query_params hashref to a number of uri_for() calls successively, but if there are characters in the query params that need to be escaped they get escaped each time, leading to sequences like

?filter=Not%25252BRun

after the same $query_params have been run through uri_for a few of times (because the '%' keeps getting escaped). The query hash was originally { filter => 'Not Run' }.

So, we patched uri_for() here at work to create a copy of $params and work with that, and that fixes the issue. However, it seems like such a simple fix that I feel like it must have been thought of and discussed and shot down in the past, but I didn't find anything in the list archives indicating that. Is there some reason uri_for() does things that way?

If not I'll gladly supply patch + test.

Thanks,
Byron

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Subject User Time
uri_for() corrupts query parameters hash for caller Byron.Young at riverbed Jun 12, 2009, 2:43 PM
    RE: uri_for() corrupts query parameters hash for caller Byron.Young at riverbed Jun 12, 2009, 2:48 PM
        Re: RE: uri_for() corrupts query parameters hash for caller bobtfish at bobtfish Jun 26, 2009, 8:02 AM
            RE: RE: uri_for() corrupts query parameters hash for caller Byron.Young at riverbed Jun 26, 2009, 3:19 PM
        Re: RE: uri_for() corrupts query parameters hash for caller bobtfish at bobtfish Jun 29, 2009, 4:23 PM
            RE: RE: uri_for() corrupts query parameters hash for caller Byron.Young at riverbed Jun 29, 2009, 4:31 PM
        Re: RE: uri_for() corrupts query parameters hash for caller bobtfish at bobtfish Jun 29, 2009, 5:32 PM
            RE: RE: uri_for() corrupts query parameters hash for caller Byron.Young at riverbed Jun 29, 2009, 5:41 PM
            Re: uri_for() corrupts query parameters hash for caller pagaltzis at gmx Jun 29, 2009, 10:29 PM
    RE: uri_for() corrupts query parameters hash for caller Byron.Young at riverbed Jun 25, 2009, 12:51 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.