On Fri, 3 Nov 2000, Paul J. Lucas wrote:

>       So from within a function, I'm doing
> 
>               my $r = Apache::Request->new( Apache->request() );
>               warn "request=", $r->as_string(), "\n";
> 
>       and, when I to a POST request, I get:
> 
> Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
> Content-Length: 6978
> Content-Type: multipart/form-data; boundary=curl3cwvW7Ge8lVBtEGuDRCENOMeIVO
> Host: www.abacus-new.com:80
> Pragma: no-cache
> User-Agent: Mozilla/4.0
> 
> HTTP/1.0 (null)
> 
>       Why is the content merely "HTTP/1.0 (null)"?  What happened to
>       the other 6900 bytes or so?

that's the expected result if you haven't called $r->send_http_header yet.

example:
warn $r->as_string;

$r->send_http_header('text/plain');

print $r->as_string;

the error_log $r->warn output is:
GET /perl/test.pl HTTP/1.0
...

HTTP/1.0 (null)

now that $r->status_line and $r->headers_out have been set by
$r->send_http_header, the $r->print output is:
HTTP/1.0 200 OK
Connection: close
Content-Type: text/plain


Reply via email to