Last Comment Bug 744927 - Snappy Symbolication Server - Invalid Content Length throws exception
: Snappy Symbolication Server - Invalid Content Length throws exception
Product: Core
Classification: Components
Component: Gecko Profiler (show other bugs)
: unspecified
: All All
-- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: Markus Stange [:mstange]
Depends on:
Blocks: 744126
  Show dependency treegraph
Reported: 2012-04-12 13:32 PDT by David Chan [:dchan]
Modified: 2012-04-16 09:49 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description User image David Chan [:dchan] 2012-04-12 13:32:05 PDT
Passing a Content-Length that can not be converted to an int results int he server throwing. [1]

1. curl -H "Content-Length: a" -d ""

No Error

Exception happened during processing of request from ('', 63966)
Traceback (most recent call last):
  File "/usr/lib/python2.6/", line 560, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.6/", line 322, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.6/", line 617, in __init__
  File "/usr/lib/python2.6/", line 329, in handle
  File "/usr/lib/python2.6/", line 323, in handle_one_request
  File "", line 64, in do_POST
    length = int(self.headers["Content-Length"])
ValueError: invalid literal for int() with base 10: 'a'

[1] -
Comment 1 User image Vladan Djeric (:vladan) 2012-04-13 17:50:37 PDT
Moved the Content-Length lookup inside the adjacent try block.

Patch with all the sec review fixes:

Note You need to log in before you can comment on or make changes to this bug.