jetti777Ltd / mochiweb

Automatically exported from code.google.com/p/mochiweb
Other
0 stars 0 forks source link

mochiweb_request.get(body_length) always returns undefined #64

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. call Req.get(body_length) for a request with a body specified 
    (content-length set, chunked etc)

What is the expected output? What do you see instead?
The actual body_length should be returned, but the call always returns 
undefined.

What version of the product are you using? On what operating system?
Latest version used (r139).
OS is irrelevant.

Please provide any additional information below.
I've attached a fix which follows the logic of get(path). The difference is 
that undefined in case of 
body_length is a valid response hence the result of body_length() has to be 
wrapped. Otherwise 
cached undefined and not yet computed and cached undefined is not 
differentiable.

Original issue reported on code.google.com by Tamas.Na...@gmail.com on 18 Feb 2010 at 9:58

Attachments:

GoogleCodeExporter commented 8 years ago
r140

Original comment by bob.ippo...@gmail.com on 19 Feb 2010 at 4:14