Joshua Chamas
Thu, 03 Mar 2005 23:47:14 -0800
- I set ASP's debug level to -1 and diffed the logs between the success and failure cases. The only significant change is this one:
Success: "read 2343 bytes, tried 2343 bytes" Failure: "read 1387 bytes, tried 2354 bytes"
That message is printed by ASP/Request.pm, line 232. This is plainly the culprit: the read() call above this line isn't returning the entire HTTP request in a single call.
The main reason I'm posting to the list is because it isn't clear to me what the cleanest way to fix this is. I could hack some loop on that read() call, but I'd rather Josh chimed in on this one.
I am not sure hacking a loop on this would help, but it would be interesting to know if it did. Here is the code:
} else {
$r->read($data, $length);
$asp->{dbg} && $asp->Debug("read ".length($data)." bytes, tried $length
bytes");
}This is an Apache/mod_perl API, so not sure what is going on wrong here. Could Apache/mod_perl have a bug, might post to the mod_perl list with the problem. I wonder if there is character data in the input stream that is messing things up.
Here is the docs for this API:
$r->read($buf, $bytes_to_read, [$offset])
This method is used to read data from the client, looping until it
gets all of $bytes_to_read or a timeout happens. An offset may be specified to place the read data at some other
place than the beginning of the string. In addition, this method sets a timeout before reading with
"$r->soft_timeout".So maybe a timeout is happening here on the Apache side?
Regards,
Josh
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]