On Wed, 24 Apr 2002, Vicki Brown wrote:

> my docs say that the first line returned by the server response is the status
> line, and it is of the form
>     HTTP/1.1 200  OK
>
> However,  $r->status_line returns only the status portion of this.
>
> $mess->protocol([$proto])
>            Sets the HTTP protocol used for the message.
>
> If I'm required to include a status line in my header, how do I get the
> complete status line (with protocol) from the LWP request  result?

You're not required to include a status line from the output of your CGI
script--the server does that for you (unless you're using an nph- script,
which I assume is not the case).

If you want to mirror the status from your LWP response back to the
client, you can use

print "Status: " . $resp->status_line . "\r\n";

Your Web server will take that Status directive and generate the proper
status line including the protocol.

-- 
Liam Quinn


Reply via email to