|
|
| Don't ask to ask, just ask | |
| PerlMonks |
Re:x2 Reading RAW POST databy grinder (Bishop) |
| on Dec 16, 2001 at 20:23 UTC ( #132356=note: print w/ replies, xml ) | Need Help?? |
|
In the general case, this code would be very fragile. Servers can lie about content length; things can go wrong. You should attempt to try to read a certain number of times, possibly giving up after a series of consective reads that draw zero bytes, and/or return all that you have after a given amount of time. update to Ilya's response: I should clarify my statement. Several years ago I had that sort of code running in a script, and I came to grief over the problem of content length. It didn't always correspond to what I received. I no longer have access to the code, so I can't go and look it up, but in a nutshell I ignored the content-length value, and just tried to read as much as I could in a certain time frame (45 seconds IIRC). That said, I'm willing to believe that servers these days are much more reliable, and produce accurate values for content length... although I think I'll always mistrust them. --g r i n d e r
|
|||||||||||||||||||||||||
| Comment on Re:x2 Reading RAW POST data | |
|---|---|
| Re: Re:x2 Reading RAW POST data by IlyaM (Parson) on Dec 17, 2001 at 01:42 UTC | |
| Re: Re:x2 Reading RAW POST data by IlyaM (Parson) on Dec 18, 2001 at 15:35 UTC |
| Log In? |
|---|
| Node Status? |
|
node history Node Type: note [id://132356] help |
| Chatterbox? |
|
How do I use this? | Other CB clients |
| Other Users? |
|
Others making s'mores by the fire in the courtyard of the Monastery: (6) As of 2013-05-26 07:50 GMT |
| Sections? |
| Information? |
| Find Nodes? |
| Leftovers? |
|
|
| Voting Booth? |
The best material for plates (tableware) is: |