in reply to Finding XML POST data in HTTP::Server::Simple::CGI
I think you'll need to provide us with a runnable example that reproduces the problem (see http://sscce.org/). POSTDATA works fine for me:
{ package SimpleSrv; use parent 'HTTP::Server::Simple::CGI'; sub handle_request { my ($self,$cgi) = @_; print "HTTP/1.1 200\x0D\x0A"; print $cgi->header(-type=>'text/plain'); print "<<<".($cgi->param('POSTDATA')//"undef").">>>\n"; } } my $server = SimpleSrv->new(8080); $server->host('127.0.0.1'); $server->run();
Example:
$ telnet localhost 8080 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. POST /hello HTTP/1.1 Content-type: text/plain Content-length: 6 foobar HTTP/1.1 200 Content-Type: text/plain; charset=ISO-8859-1 <<<foobar>>> Connection closed by foreign host.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Finding XML POST data in HTTP::Server::Simple::CGI
by Wiggins (Hermit) on Mar 16, 2016 at 18:42 UTC | |
by derby (Abbot) on Mar 16, 2016 at 19:18 UTC | |
by Wiggins (Hermit) on Mar 16, 2016 at 19:42 UTC | |
by derby (Abbot) on Mar 17, 2016 at 10:43 UTC | |
by Anonymous Monk on Mar 16, 2016 at 18:54 UTC | |
by Wiggins (Hermit) on Mar 16, 2016 at 19:30 UTC | |
by Anonymous Monk on Mar 16, 2016 at 19:39 UTC | |
by Wiggins (Hermit) on Mar 16, 2016 at 19:49 UTC | |
|