in reply to Re^2: HTTP headers and redirection
in thread HTTP headers and redirection
You print two headers: Content-type, and location, then you send "this is the body" as the body of the message. However, if you do this:print "Content-type: text/html\n"; print "Location: foo\n\n"; print "This is the body"
You are only sending one header, the Content-type. The Location: foo line and the "this is the body" is all interpreter as part of the body of the response.print "Content-type: text/html\n\n"; print "Location: foo\n"; print "This is the body"
|
|---|