]> git.saurik.com Git - apt.git/commit - test/interactive-helper/aptwebserver.cc
handle servers closing encoded connections correctly
authorDavid Kalnischkies <david@kalnischkies.de>
Mon, 30 Mar 2015 17:52:32 +0000 (19:52 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Sat, 18 Apr 2015 23:13:09 +0000 (01:13 +0200)
commit117038bac90261351518870b3f48136f134d4bfc
treeb486af6bb5e0b9fa0e843276459c236c03b26da7
parenta09f6eb8fc67cd2d836019f448f18580396185e5
handle servers closing encoded connections correctly

Servers who advertise that they close the connection get the 'Closes'
encoding flag, but this conflicts with servers who response with a
transfer-encoding (e.g. encoding) as it is saved in the same flag.

We have a better flag for the keep-alive (or not) of the connection
anyway, so we check this instead of the encoding.

This is in practice not much of a problem as real servers we talk to are
HTTP1.1 servers (with keep-alive) and there isn't much point in doing
chunked encoding if you are going to close anyway, but our simple
testserver stumbles over this if pressed and its a bit cleaner, too.

Git-Dch: Ignore
methods/http.cc
test/interactive-helper/aptwebserver.cc