Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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

by 7stud (Deacon)
on Mar 09, 2018 at 14:13 UTC ( [id://1210567]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl
    
    ...
              $q->h1($error),
              $q->end_html;
    }
    
  2. or download this
    ~$ curl -v -H 'Content-Type: application/json' --data '{"a": 1, "b": 2
    +}' http://localhost:65451/cgi-bin/1.pl
    *   Trying ::1...
    ...
    < 
    * Closing connection 0
    ~$
    
  3. or download this
    ~$ curl -v -H 'Content-Type: application/json' --data '{"a": 1, "b": 2
    +}' http://localhost:65451/cgi-bin/1.pl
    *   Trying ::1...
    ...
    * Connection #0 to host localhost left intact
    <div>a=1</div><div>b=2</div>~$ 
    </div>
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-25 16:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found