CGI.pm POSTed bodies
I'm trying to make Blosxom play nicely with various semi-standard XML-RPC protocols, and I've run into a silly silly problem.
I can't find a way, in a CGI.pm-using perl script, to get reliable access to the POSTed body. Even thought it's properly-labelled as text/xml rather than application/x-www-form-urlencoded, CGI.pm parses it as query data.
That would be okay, if CGI.pm's query_string's behavior matched its docs.
You can also retrieve the unprocessed query string with query_string()
Unfortunately, it's not the unprocessed query string at all -- it's a reconstituted query string, created from the parsed data. When the data's not originally in the format it's trying to parse, of course, that's not very reliable (even if it were form data, it wouldn't be reliable, since parameters can be separated by either ampersands or semicolons and that information is lost during parsing).
I'm almost to the point of just hardcoding a transform to try to undo the munging, but I can't even figure out exactly what it's doing.
story2<br><br>this is a second story. and shite.<br>
gets transformed to
story2;lt=;lt=;lt=;br>=;br>this is a second story. and shite.=;br>
2003-04-12 22:51:00 | Comments (0) | TrackBack (0) | Computers::Programming