Journal ObviousGuy's Journal: Parsing multi-part HTTP requests without using CGI.pm 3
The free webserver space that the client has so graciously provided me with supports Perl but not ANY modules. I can't even install them (termination of account will ensue).
So I want to create a CGI script that will upload files via an HTML form. However, parsing the multipart HTTP request is killing me. Normally, I'd hand it over to CGI.pm and let it do the heavy lifting, but since I can't use it I am forced to roll my own parser. For whatever reason, things are not working out well. If I'm not losing one or another input value, I'm getting garbage data after parsing.
Has anyone rolled their own multi-part form parser? Is it really as difficult as I think?
not difficult, but... (Score:3)
It can be done, though. Expect 10-20% hair loss.
Re:not difficult, but... (Score:2)
I really can't see the reasoning behind not allowing modules. It isn't just CGI.pm. It is every single module that is not built into the perl executable.
As for switching servers, the client gets this space for free since he signed up with the biggest ISP in Japan. Not rinky dink by any means. Just completely idiotic.
Re:not difficult, but... (Score:3)
Hopefully you are getting paid by the hour
That's really shitty, though. Multi-part is annoying, just use (copy & paste) the CGI.pm relevant functions -- they'll not know the difference.