Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: CGI: newlines, write exactly "\r\n" to end the headers, then turn off binmode

by Anonymous Monk
on Mar 10, 2018 at 08:01 UTC ( [id://1210601]=note: print w/replies, xml ) Need Help??


in reply to Re: CGI: newlines, write exactly "\r\n" to end the headers, then turn off binmode
in thread CGI: newlines, write exactly "\r\n" to end the headers, then turn off binmode

Hi,

$cgi->{POSTDATA} gives me inconsistent results depending on my server

Hmm, that isn't exactly how you spell  $cgi->param('POSTDATA')

I'm sure both CGI.pm maintainer and erlang inets maintainers would be grateful for code that demonstrates these bugs , so they can fix them.

I'm experimenting with an Erlang inets httpd server. If you install Erlang, I can give you the code to start a server.

What version of erlang inets ? Surely even erlang inets httpd server have version numbers :)

When I create a cgi object after reading from STDIN, my curl request to my Erlang server for the cgi script hangs, then times out (but it does succeed on my apache server):

I'm fairly certain thats the version that tries to read from STDIN. So I would suggest checking CGI.pm docs for ->new and use the version of the call that doesn't try to read from STDIN

1210567 In reply to 1210553

Why are you replying to your own nodes instead of hitting "reply" to the node you're quoting?

Threaded discussion is threaded.

  • Comment on Re^2: CGI: newlines, write exactly "\r\n" to end the headers, then turn off binmode
  • Download Code

Replies are listed 'Best First'.
Re^3: CGI: newlines, write exactly "\r\n" to end the headers, then turn off binmode
by 7stud (Deacon) on Mar 10, 2018 at 11:41 UTC

    Hmm, that isn't exactly how you spell $cgi->param('POSTDATA')

    Sorry about that. I checked my code and it's spelled correctly in my code.

    What version of erlang inets ? Surely even erlang inets httpd server have version numbers :)

    It's actually in the curl output I posted:

    * upload completely sent off: 16 out of 16 bytes < HTTP/1.1 200 OK < Date: Fri, 09 Mar 2018 14:52:03 GMT < Server: inets/6.4.5

    I'm using erlang 20.2, so I assume inets 6.4.5 is the most recent version. Thanks for taking a look.

    I'm fairly certain thats the version that tries to read from STDIN. So I would suggest checking CGI.pm docs for ->new and use the version of the call that doesn't try to read from STDIN

    Yep, my$q->CGI-new('') allows me to use the CGI functions after I manually read from STDIN.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1210601]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2025-06-20 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.