tstorch / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

mongoose.py 'get_var' function has subtle bug #227

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Fire up 'example.py' (provided in source distro)
2. Call 'http://localhost:8080/show' from a web browser.

What is the expected output? What do you see instead?
 - When called without a 'my_var' provided in GET request, expect it to show "<not set>" (as defined in example.py, line 28).

What version of the product are you using? On what operating system?
 - version 2.11, linux

Please provide any additional information below.
 - easy way to fix is to change 'get_var' in 'mongoose.py' to:
        size = 0 if not data else len(data)
   instead of:
        size = len(data)

Original issue reported on code.google.com by kevin.t....@gmail.com on 6 Feb 2011 at 7:40

GoogleCodeExporter commented 9 years ago

Original comment by valenok on 22 Jun 2011 at 1:24