<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/methods/http.h, branch 2.1.20</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.1.20</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.1.20'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2020-08-11T11:09:04Z</updated>
<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>
<entry>
<title>Use steady clock source for bandwidth limitation</title>
<updated>2018-05-29T11:04:59Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2018-05-26T19:26:03Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=f6655a1138a11e80884959014939a25f23a1e308'/>
<id>urn:sha1:f6655a1138a11e80884959014939a25f23a1e308</id>
<content type='text'>
Using the time of day for this is slightly wrong just like it is for
progress, just less visible.
</content>
</entry>
<entry>
<title>Remove unused time-tracking from http method</title>
<updated>2018-05-28T15:59:38Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2018-05-26T19:28:55Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=2fc09a90e7e62a4c3e4a67506bf90fcf4c6ccfaf'/>
<id>urn:sha1:2fc09a90e7e62a4c3e4a67506bf90fcf4c6ccfaf</id>
<content type='text'>
The Stats method isn't called anywhere, was partly commented out before,
but we keep updating the time for it – lets avoid this pointless busywork.

Gbp-Dch: Ignore
</content>
</entry>
<entry>
<title>Remove obsolete RCS keywords</title>
<updated>2018-05-07T11:41:31Z</updated>
<author>
<name>Guillem Jover</name>
<email>guillem@debian.org</email>
</author>
<published>2018-05-06T20:32:41Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=164f1b78d1849a0f33df7352875f86e28f5de06a'/>
<id>urn:sha1:164f1b78d1849a0f33df7352875f86e28f5de06a</id>
<content type='text'>
Prompted-by: Jakub Wilk &lt;jwilk@debian.org&gt;
</content>
</entry>
<entry>
<title>report transient errors as transient errors</title>
<updated>2017-12-13T22:56:29Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-10-25T22:57:26Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=47c0bdc310c8cd62374ca6e6bb456dd183bdfc07'/>
<id>urn:sha1:47c0bdc310c8cd62374ca6e6bb456dd183bdfc07</id>
<content type='text'>
The Fail method for acquire methods has a boolean parameter indicating
the transient-nature of a reported error. The problem with this is that
Fail is called very late at a point where it is no longer easily
identifiable if an error is indeed transient or not, so some calls were
and some weren't and the acquire system would later mostly ignore the
transient flag and guess by using the FailReason instead.

Introducing a tri-state enum we can pass the information about fatal or
transient errors through the callstack to generate the correct fails.
</content>
</entry>
<entry>
<title>allow the auth.conf to be root:root owned</title>
<updated>2017-07-26T17:09:04Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-07-07T20:21:44Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=881ec045b6660e2fe0c6953720260e380ceeeb99'/>
<id>urn:sha1:881ec045b6660e2fe0c6953720260e380ceeeb99</id>
<content type='text'>
Opening the file before we drop privileges in the methods allows us to
avoid chowning in the acquire main process which can apply to the wrong
file (imagine Binary scoped settings) and surprises users as their
permission setup is overridden.

There are no security benefits as the file is open, so an evil method
could as before read the contents of the file, but it isn't worse than
before and we avoid permission problems in this setup.
</content>
</entry>
<entry>
<title>http: Add support for CONNECT proxying to HTTPS locations</title>
<updated>2017-06-30T13:00:41Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2017-06-30T11:24:04Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=64207dad49f1c803d2b004ccf8fc6432789a8cc2'/>
<id>urn:sha1:64207dad49f1c803d2b004ccf8fc6432789a8cc2</id>
<content type='text'>
Proxying HTTPS traffic requires the proxy providing the
CONNECT method. This implements the client side of it,
although it is a bit hacky.

HTTP connect is a normal HTTP CONNECT request, followed
by a normal HTTP response, just that the body of the
response is the TCP stream of the target host.

We use a special wrapper in case there are data bytes
in the header packets - in that case, the bytes are
stored in a buffer and the buffer will be drained first,
afterwards the connection continues directly with the
TCP stream (with one more vcall).

Also: Do not send full URI to https destinations when proxying,
as we are directly interfacing with the destination data stream.
</content>
</entry>
<entry>
<title>methods: connect: Switch from int fds to new MethodFd</title>
<updated>2017-06-28T13:52:38Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2017-06-28T08:55:08Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=5666084ecfe140aaa3f89388de557c2f875b4244'/>
<id>urn:sha1:5666084ecfe140aaa3f89388de557c2f875b4244</id>
<content type='text'>
Use std::unique_ptr&lt;MethodFd&gt; everywhere we used an
integer-based file descriptor before. This allows us
to implement stuff like TLS support easily.

Gbp-Dch: ignore
</content>
</entry>
<entry>
<title>rename ServerMethod to BaseHttpMethod</title>
<updated>2016-12-31T01:29:21Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2016-12-09T14:13:09Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=d8617331afc39281d5925033975b6097128786f4'/>
<id>urn:sha1:d8617331afc39281d5925033975b6097128786f4</id>
<content type='text'>
This 'method' is the abstract base for http and https and should as such
be called out like this rather using an easily confused name.

Gbp-Dch: Ignore
</content>
</entry>
<entry>
<title>separating state variables regarding server/request</title>
<updated>2016-12-31T01:29:21Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2016-11-09T11:25:44Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=13a9f08de18dea0dfc1951992b0ddeda9c2fa2dd'/>
<id>urn:sha1:13a9f08de18dea0dfc1951992b0ddeda9c2fa2dd</id>
<content type='text'>
Having a Reset(bool) method to partially reset certain variables like
the download size always were strange, so this commit splits the
ServerState into an additional RequestState living on the stack for as
long as we deal with this request causing an automatic "reset".

There is much to do still to make this code look better, but this is a
good first step which compiles cleanly and passes all tests, so keeping
it as history might be beneficial and due to avoiding explicit memory
allocations it ends up fixing a small memory leak in https, too.

Closes: #440057
</content>
</entry>
</feed>
