Issue #941 resolved

a broken HTTP header from IE7 triggers a python error

guest
created an issue

A page refresh in IE7 (version number 7.0.6001) behind an ISP proxy in Singapore has a header with a malformed line: "Re, 1.2.3.4#015#012" where 1.2.3.4 is the client IP. This breaks the multiple assignment in HTTPRequest.read_headers():

{{{

!python

k, v = line.split(":", 1) }}}

since it's trying to assign a list with one item to 2 variables. The cryptic error is "ValueError: need more than 1 value to unpack". My solution is to enclose the problem code in a 'try' block and issue a 'continue' on failure.

Comments (6)

  1. Anonymous

    The provided link is not relevant. This is a broken header sent by a browser. It cannot be blamed for a hypothetical cache poisoning in squid.

  2. Log in to comment