snapd doesn't close connection on 400 bad request response

Bug #1598656 reported by Robert Ancell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
High
John Lenton

Bug Description

If I send a bad request to snapd (in this case it was a bad Macaroon header) I get the response:

HTTP/1.1 400 Bad Request
Content-Type: text/plain
Connection: close

400 Bad Request: invalid header value

Which is fine, however snapd doesn't actually close the connection. When I do a second read from snapd (the above was all in one socket read) it just blocks instead of returning 0.

Revision history for this message
John Lenton (chipaca) wrote :

This is a really god one.

We were leaking file descriptors in some situations /o\
and the hanging was the symptom of that. Thank you!

Changed in snappy:
assignee: nobody → John Lenton (chipaca)
importance: Undecided → High
status: New → In Progress
Revision history for this message
John Lenton (chipaca) wrote :
John Lenton (chipaca)
Changed in snappy:
status: In Progress → Fix Committed
Michael Vogt (mvo)
Changed in snappy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.