in reply to CGI-class changes + to space for BASE64-data

The + should only be substituted for a space in URL parameters.

Since Base64 data is often rather long anyway, a possible solution is to not use URL parameters for them, but instead POST parameters.

The functions used don't know any context, the system is used in three web applications and therefore has to be pretty general to not break anything.

You can still customize it for just one app, either by inheritance (for OO code), or by wrapping (for procedural code). AUTOLOAD can help you with automtic wrapping.

  • Comment on Re: CGI-class changes + to space for BASE64-data

Replies are listed 'Best First'.
Re^2: CGI-class changes + to space for BASE64-data
by Pickwick (Beadle) on Dec 01, 2010 at 10:53 UTC
    Since Base64 data is often rather long anyway, a possible solution is to not use URL parameters for them, but instead POST parameters.

    I get the data via a http redirect and the BASE64 data is just a signature for the other parameter values, therefore it's not that large at all.

    You can still customize it for just one app, either by inheritance (for OO code), or by wrapping (for procedural code). AUTOLOAD can help you with automtic wrapping.

    I think I will subclass CGI directly and store the needed logic in my own class, because the problem doesn't only occur in the templates, but also if one wants to read the parameter value directly in a program. It's just parse_params which needs to get changed.