Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2487 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

"ValueError: need more than 1 value to unpack" in parse_mime_type with some Accept headers

Reported by: corvus Owned by:
Priority: normal Milestone: irrespective
Component: TurboGears Version: trunk
Severity: normal Keywords:



The Accept header "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2", which I have seen in the wild (even though it doesn't appear to be valid) causes a ValueError?. It looks like parse_mime_type is expecting a '/', but it doesn't show up with the single '*' in that line.

It should probably ignore entries without a slash, or, perhaps more generously, treat them as [value]/*.

To reproduce:

telnet localhost 8080
GET /feed/rss2_0 HTTP/1.1
Host: localhost
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2

Change History

comment:1 Changed 9 years ago by brondsem

I think this is the same as #2433

comment:2 Changed 9 years ago by chrisz

  • Status changed from new to closed
  • Resolution set to fixed

This has been  fixed now in the paste trunk.

comment:3 Changed 9 years ago by chrisz

  • Milestone changed from __unclassified__ to irrespective
Note: See TracTickets for help on using tickets.