[ic] Parsing of CGI GET/POST/PUT input

Stefan Hornburg (Racke) racke at linuxia.de
Thu Nov 12 20:04:52 UTC 2009

Hello, Interchange developers!

We found on the IRC meeting on Tuesday:

The character set conversion for file uploads happens in
Vend::Server::parse_multipart before we know which catalog the file upload
belongs to. David and Racke agreed that we store the character set for
each uploaded file in $CGI::file_encoding first and do the conversion in
Vend::Dispatch::open_cat just before the call to open_database().
Functions which write the data in $CGI::file to the file system need
to pass the corresponding value in $CGI::file_encoding to

Further investigation yielded that every CGI post parameter is subject
to this character set conversion _and_ that we don't know the character
set for the catalog.

I looked into the source code and found no reason to parse CGI
input ahead of calling Vend::Dispatch::open_cat. The only thing which
is used from CGI is $CGI::script_name.

My proposal is to postpone parsing of CGI parameters and run it
from inside open_cat.

Please comment.


LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team

More information about the interchange-users mailing list