in reply to Getting POST data from HTTP Request
You don't show the code for http_request_handler. That function appears to be passed a filehandle to read the HTTP body from. The filehandle is unlikely to produce a proper EOF marker, so the request handler should peek at $req->{HEADER}{'Content-Length'}.
Any particular reason you're not using HTTP::Daemon, HTTP::Daemon::SSL, HTTP::Server::Simple, Starlet, Starman, Gepok or any other of the fine HTTP servers on CPAN? You'll save yourself a lot of work and get a better quality solution. There are, for example, at least two bugs in your parsing of HTTP headers.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Getting POST data from HTTP Request
by nss12 (Novice) on May 16, 2012 at 11:48 UTC |