Re: POST results in HTTP/1.0 (null) ??

2000-12-21 Thread Doug MacEachern

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





Re: POST results in HTTP/1.0 (null) ??

2000-11-04 Thread Paul J. Lucas

On Sat, 4 Nov 2000, G.W. Haywood wrote:

 On Fri, 3 Nov 2000, Paul J. Lucas wrote:
 
  Why is the content merely "HTTP/1.0 (null)"?  What happened to
  the other 6900 bytes or so?
 
 Maybe you need to generate them...

I did: if you read my original post, I wrote:

Orig   If I write a mini server in Perl that just dumps the contents
Orig   of the HTTP post, the posted data is correct.

I'm doing a POST with curl: the data curl generates is fine as
is in evidence by the above mini server.

 do you think you could give us a bit more to go on?

I'd be happy to: what else would you like to know?

- Paul