Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Non-CGI perl scripts on a web server?

by Amblikai (Scribe)
on Feb 23, 2015 at 13:42 UTC ( [id://1117546]=note: print w/replies, xml ) Need Help??


in reply to Re: Non-CGI perl scripts on a web server?
in thread Non-CGI perl scripts on a web server?

Thanks for your reply, so if there's nothing being returned to the browser i don't need the line at all?

  • Comment on Re^2: Non-CGI perl scripts on a web server?

Replies are listed 'Best First'.
Re^3: Non-CGI perl scripts on a web server?
by Corion (Patriarch) on Feb 23, 2015 at 13:50 UTC

    Every request to a HTTP server is supposed to return something. There is no empty reply.

    If there really is "nothing" to return, consider either outputting a redirect:

    Status: 302 Location: http://somewhere.example.com/

    ... or alternatively, outputting a page that says "Request submitted, thank you.".

Re^3: Non-CGI perl scripts on a web server?
by Happy-the-monk (Canon) on Feb 23, 2015 at 13:55 UTC

    Thanks for your reply, so if there's nothing being returned to the browser i don't need the line at all?

    If you don't mind the browser possibly displaying a "500" Internal Server Error and a "404" Not found in return, you don't.

    A simple way of stopping it from doing that may be a print "Content-Type: text/plain\n\n"; to deliver back an empty text document.

    Cheers, Sören

    Créateur des bugs mobiles - let loose once, run everywhere.
    (hooked on the Perl Programming language)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-25 19:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found