<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/test/interactive-helper/aptwebserver.cc, branch 1.1.9</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=1.1.9</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=1.1.9'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2015-09-15T08:16:09Z</updated>
<entry>
<title>tests: don't use hardcoded port for http and https</title>
<updated>2015-09-15T08:16:09Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2015-09-14T22:33:12Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=6c0765c096ffb4df14169236c865bbb2b10974ae'/>
<id>urn:sha1:6c0765c096ffb4df14169236c865bbb2b10974ae</id>
<content type='text'>
This allows running tests in parallel.

Git-Dch: Ignore
</content>
</entry>
<entry>
<title>Merge branch 'debian/sid' into debian/experimental</title>
<updated>2015-05-22T15:01:03Z</updated>
<author>
<name>Michael Vogt</name>
<email>mvo@ubuntu.com</email>
</author>
<published>2015-05-22T15:01:03Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=4fc6b7570c3e97b65c118b58cdf6729fa94c9b03'/>
<id>urn:sha1:4fc6b7570c3e97b65c118b58cdf6729fa94c9b03</id>
<content type='text'>
Conflicts:
	apt-pkg/pkgcache.h
	debian/changelog
	methods/https.cc
	methods/server.cc
	test/integration/test-apt-download-progress
</content>
</entry>
<entry>
<title>Add regression test for LP: #1445239</title>
<updated>2015-05-22T14:05:05Z</updated>
<author>
<name>Michael Vogt</name>
<email>mvo@ubuntu.com</email>
</author>
<published>2015-05-22T14:05:05Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=f4a91278c65b156c1addf27b0b05b029692959e8'/>
<id>urn:sha1:f4a91278c65b156c1addf27b0b05b029692959e8</id>
<content type='text'>
Add a regression test that reproduced the hang of apt when a
partial file is present.

Git-Dch: ignore
</content>
</entry>
<entry>
<title>Fix endless loop in apt-get update that can cause disk fillup</title>
<updated>2015-05-22T13:28:53Z</updated>
<author>
<name>Michael Vogt</name>
<email>mvo@ubuntu.com</email>
</author>
<published>2015-05-22T13:28:53Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=ceafe8a6edc815df2923ba892894617829e9d3c2'/>
<id>urn:sha1:ceafe8a6edc815df2923ba892894617829e9d3c2</id>
<content type='text'>
The apt http code parses Content-Length and Content-Range. For
both requests the variable "Size" is used and the semantic for
this Size is the total file size. However Content-Length is not
the entire file size for partital file requests. For servers that
send the Content-Range header first and then the Content-Length
header this can lead to globbing of Size so that its less than
the real file size. This may lead to a subsequent passing of a
negative number into the CircleBuf which leads to a endless
loop that writes data.

Thanks to Anton Blanchard for the analysis and initial patch.

LP: #1445239
</content>
</entry>
<entry>
<title>detect 416 complete file in partial by expected hash</title>
<updated>2015-05-11T22:30:16Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2015-05-11T22:30:16Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=dcbb364fc69e1108b3fea3adb12a7ba83d9af467'/>
<id>urn:sha1:dcbb364fc69e1108b3fea3adb12a7ba83d9af467</id>
<content type='text'>
If we have the expected hashes we can check with them if the file we
have in partial we got a 416 for is the expected file. We detected this
with same-size before, but not every server sends a good Content-Range
header with a 416 response.
</content>
</entry>
<entry>
<title>a hit on Release files means the indexes will be hits too</title>
<updated>2015-04-18T23:13:10Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2015-04-12T15:08:46Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=ba6b79bd0090077724fa1272ea4d3a31706fcd5a'/>
<id>urn:sha1:ba6b79bd0090077724fa1272ea4d3a31706fcd5a</id>
<content type='text'>
If we get a IMSHit for the Transaction-Manager (= the InRelease file or
as its still supported fallback Release + Release.gpg combo) we can
assume that every file we would queue based on this manager, but already
have locally is current and hence would get an IMSHit, too. We therefore
save us and the server the trouble and skip the queuing in this case.
Beside speeding up repetative executions of 'apt-get update' this way we
also avoid hitting hashsum errors if the indexes are in fact already
updated, but the Release file isn't yet as it is the case on well
behaving mirrors as Release files is updated last.

The implementation is a bit harder than the theory makes it sound as we
still have to keep reverifying the Release files (e.g. to detect now expired
once to avoid an attacker being able to silently stale us) and have to
handle cases in which the Release file hits, but some indexes aren't
present (e.g. user added a new foreign architecture).
</content>
</entry>
<entry>
<title>handle servers closing encoded connections correctly</title>
<updated>2015-04-18T23:13:09Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2015-03-30T17:52:32Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=117038bac90261351518870b3f48136f134d4bfc'/>
<id>urn:sha1:117038bac90261351518870b3f48136f134d4bfc</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>derive more of https from http method</title>
<updated>2015-03-16T17:00:50Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2015-03-09T00:54:46Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=905fba60a046646a26a56b4c5d4a5dc7d5906f0d'/>
<id>urn:sha1:905fba60a046646a26a56b4c5d4a5dc7d5906f0d</id>
<content type='text'>
Bug #778375 uncovered that https wasn't properly integrated in the class
family tree of http as it was supposed to be leading to a NULL pointer
dereference. Fixing this 'properly' was deemed to much diff for
practically no gain that late in the release, so commit
0c2dc43d4fe1d026650b5e2920a021557f9534a6 just fixed the synptom, while
this commit here is fixing the cause plus adding a test.
</content>
</entry>
<entry>
<title>merge debian/sid into debian/experimental</title>
<updated>2015-03-16T16:59:31Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2015-03-09T00:34:10Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=d61960d9244340956a27f4ca46aecd15cc75e18b'/>
<id>urn:sha1:d61960d9244340956a27f4ca46aecd15cc75e18b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>dispose http(s) 416 error page as non-content</title>
<updated>2014-12-22T13:23:39Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2014-11-29T16:59:52Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=92e8c1ff287ab829de825e00cdf94744e699ff97'/>
<id>urn:sha1:92e8c1ff287ab829de825e00cdf94744e699ff97</id>
<content type='text'>
Real webservers (like apache) actually send an error page with a 416
response, but our client didn't expect it leaving the page on the socket
to be parsed as response for the next request (http) or as file content
(https), which isn't what we want at all… Symptom is a "Bad header line"
as html usually doesn't parse that well to an http-header.

This manifests itself e.g. if we have a complete file (or larger) in
partial/ which isn't discarded by If-Range as the server doesn't support
it (or it is just newer, think: mirror rotation).
It is a sort-of regression of 78c72d0ce22e00b194251445aae306df357d5c1a,
which removed the filesize - 1 trick, but this had its own problems…

To properly test this our webserver gains the ability to reply with
transfer-encoding: chunked as most real webservers will use it to send
the dynamically generated error pages.

(The tests and their binary helpers had to be slightly modified to
apply, but the patch to fix the issue itself is unchanged.)

Closes: 768797
</content>
</entry>
</feed>
