<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/methods/basehttp.h, branch 3.1.6</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=3.1.6</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=3.1.6'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2025-01-17T19:32:40Z</updated>
<entry>
<title>Workaround gcc 14.2.0-9 regression in no-tree-slp-vectorize on Graviton</title>
<updated>2025-01-17T19:32:40Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2025-01-17T19:27:34Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=98ddccc166d6f212ea466598485f1ea94f1c92f9'/>
<id>urn:sha1:98ddccc166d6f212ea466598485f1ea94f1c92f9</id>
<content type='text'>
gcc 14.2.0-9 causes vector instructions to be emitted in the
constructor when it is being inlined into BaseHttpMethod::Loop(),
which seemingly only on Graviton instances, causes the field to
be initialized to 0 (Chunked) instead of 2 (Closes), causing the
code to fail later when it tries to interpret file data as the
chunk size. It's plausible we are missing some register saving
here - that is, the q31 register overrides an x register.

Work around this by making Closes element 0, such that 0
initialisation results in the correct Closes value.

Reported-By: Myon on IRC
</content>
</entry>
<entry>
<title>Drop APT_NORETURN usage</title>
<updated>2025-01-05T22:16:08Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2024-12-26T21:00:03Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=9000543eb219f83b6b9592b681fc6811bc56e26f'/>
<id>urn:sha1:9000543eb219f83b6b9592b681fc6811bc56e26f</id>
<content type='text'>
[[noreturn]] is a C++11 feature and so we can just use it
unconditionally.
</content>
</entry>
<entry>
<title>Drop usage of macro APT_OVERRIDE for simple override</title>
<updated>2025-01-05T22:16:08Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2024-12-26T19:41:53Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=f73593a4034d9eec0ec4466b8e173d4a4daece1f'/>
<id>urn:sha1:f73593a4034d9eec0ec4466b8e173d4a4daece1f</id>
<content type='text'>
We were rather inconsistent in using it and as our public headers
contain deduction guides (a c++17 feature) it seems silly to try to hide
a c++11 feature in a macro, so lets stop this charade and drop the
macro and while we are changing all these lines lets apply [[nodiscard]]
(another c++17 feature) and other suggestions from clang-tidy and
formatting for a little more consistency.
</content>
</entry>
<entry>
<title>http: use Retry-After HTTP header to optimize retries</title>
<updated>2024-11-18T12:44:49Z</updated>
<author>
<name>Felix Moessbauer</name>
<email>felix.moessbauer@siemens.com</email>
</author>
<published>2024-11-08T14:04:17Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=7b9dea5a7c43fd91bcd23d1585d39a726d098285'/>
<id>urn:sha1:7b9dea5a7c43fd91bcd23d1585d39a726d098285</id>
<content type='text'>
Some mirrors like snapshot.debian.org apply strict http rate limits.
While apt already has an exponential backoff mechanism implemented, this
is not sufficient due to the following reasons:

1. all retries happen roughly at the same time
2. the retry-after information from the server is not used

We fix this by improving the algorithm: First, if present, the timestamp
or duration of the Retry-After header is added to the exponential
backoff, optimizing for success-on-second-try. Second, a random delay is
added (delay += [0, delay]) to distribute the retries to not immediately
run into the limit again. To avoid super-long delays, this is capped by
the configured maximum delay. This logic only becomes active if the
option Acquire::Retries::HandleRetryAfter is enabled.

Signed-off-by: Felix Moessbauer &lt;felix.moessbauer@siemens.com&gt;
</content>
</entry>
<entry>
<title>Modernize standard library includes</title>
<updated>2024-02-20T12:49:04Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-02-20T12:43:08Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=40a75722c43ae24cb9a99d6730a3b25b65819c49'/>
<id>urn:sha1:40a75722c43ae24cb9a99d6730a3b25b65819c49</id>
<content type='text'>
This was automated with sed and git-clang-format, and then I had to
fix up the top of policy.cc by hand as git-clang-format accidentally
indented it by two spaces.
</content>
</entry>
<entry>
<title>basehttp: Rename HaveContent's Tristate</title>
<updated>2021-11-23T19:19:23Z</updated>
<author>
<name>Cameron Katri</name>
<email>me@cameronkatri.com</email>
</author>
<published>2021-11-23T19:19:23Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=6f35750118a06e9d11e6aa7ab29f4ef01b75898b'/>
<id>urn:sha1:6f35750118a06e9d11e6aa7ab29f4ef01b75898b</id>
<content type='text'>
Darwin systems define TRUE and FALSE as preprocessor macros for use with
bool. This conflicts with the enum values causing the compilation to
fail.
</content>
</entry>
<entry>
<title>basehttp: Turn HaveContent into a TriState</title>
<updated>2021-07-01T13:35:21Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2021-07-01T13:35:21Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=f9e2e914996ce8f0af33d5bfed52e814e0f4a861'/>
<id>urn:sha1:f9e2e914996ce8f0af33d5bfed52e814e0f4a861</id>
<content type='text'>
We need to be able to set HaveContent to false if the Content-Length
is 0, and not have that overriden just because a later header is
Content-Type.
</content>
</entry>
<entry>
<title>Ensure HTTP status code text has sensible content</title>
<updated>2021-02-04T10:00:00Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-06-28T18:59:27Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=3e53dbbe758a4e2da378ebf0296d8105d4a5804c'/>
<id>urn:sha1:3e53dbbe758a4e2da378ebf0296d8105d4a5804c</id>
<content type='text'>
We use the code in error messages, so at least for that edgecase we
should ensure that it has sensible content. Note that the acquire
system aborts on non-sensible message content in SendMessage, so you
can't really exploit this.
</content>
</entry>
<entry>
<title>basehttp: also consider Access when a Server's URI</title>
<updated>2020-12-22T23:23:22Z</updated>
<author>
<name>Faidon Liambotis</name>
<email>paravoid@debian.org</email>
</author>
<published>2020-12-22T23:23:22Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=570861fc55ba38c1092fac1d555111bab4577b49'/>
<id>urn:sha1:570861fc55ba38c1092fac1d555111bab4577b49</id>
<content type='text'>
ServerState-&gt;Comp() is used by the HTTP methods main loop to check
whether a connection can be reused, or whether a new one is needed.

Unfortunately, the currently implementation only compares the Host and
Port between the ServerState's internal URI, with a new URI. However
these are URIs, and therefore Port is 0 when a URI port is not
specificied, i.e. in the most common configurations.

As a result, a ServerState for http://example.org/... will be reused for
URIs of the form https://example.org/..., as both Host (example.org) and
Port (0) match. In turn this means that GET requests will happen over
port 80, in cleartext, even for those https URLs(!).

URI Acquires for an http URI and subsequently for an https one, in the
same aptmethod session, do not typically happen with apt as the
frontend, as apt opens a new pipe with the "https" aptmethod binary
(nowadays a symlink to http), which is why this hasn't been a problem in
practice and has eluded detection so far. It does happen in the wild
with other frontends (e.g. reprepro), plus is legitimately an odd and
surprising behavior on apt's end.

Therefore add a comparison for the URI's "Access" (= the scheme) in
addition to Host and Port, to ensure that we're not reusing the same
state for multiple different schemes.
</content>
</entry>
<entry>
<title>http: Fully flush local file both before/after server read</title>
<updated>2020-08-11T11:09:04Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-08-11T08:55:09Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=73780d7f664a4ea1da55527d726b4c9c7753f1fb'/>
<id>urn:sha1:73780d7f664a4ea1da55527d726b4c9c7753f1fb</id>
<content type='text'>
We do not want to end up in a code path while reading content
from the server where we have local data left to write, which
can happen if a previous read included both headers and content.

Restructure Flush() to accept a new argument to allow incomplete
flushs (which do not match our limit), so that it can flush as
far as possible, and modify Go() and use that before and after
reading from the server.
</content>
</entry>
</feed>
