Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Perl

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?

This discussion has been archived. No new comments can be posted.

Parsing multi-part HTTP requests without using CGI.pm

Comments Filter:
  • it's not difficult, so much as it's painful, dreary, and frustrating. It's 2003, what kind of rinky-dink outfit doesn't allow access to CGI.pm? I would have 2 words for them, and they rhyme with "truck" and "cough".

    It can be done, though. Expect 10-20% hair loss.
    • I think I'm just going to give the client instructions on how to FTP their files up manually.

      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.
      • 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.

        Hopefully you are getting paid by the hour :) -- you should tell them to suck it up and spend the $8/mo to get a "real" host that has a real perl installation.

        That's really shitty, though. Multi-part is annoying, just use (copy & paste) the CGI.pm relevant functions -- they'll not know the difference.

"Just think, with VLSI we can have 100 ENIACS on a chip!" -- Alan Perlis

Working...