<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libfetch/http.c, branch release/11.1.0</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>MFH (r313974,r314596): open .netrc early in case we want to drop privs</title>
<updated>2017-03-24T14:19:52+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2017-03-24T14:19:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=4614862b22ad5c216188daf8fb1b1b748d54a275'/>
<id>4614862b22ad5c216188daf8fb1b1b748d54a275</id>
<content type='text'>
MFH (r314396,r315143): fix a crash caused by an incorrect format string
MFH (r314701): fix handling of 416 errors when requesting a range
MFH (r315455): fix parsing of IP literals (square brackets)

PR:		212065, 217723
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MFH (r314396,r315143): fix a crash caused by an incorrect format string
MFH (r314701): fix handling of 416 errors when requesting a range
MFH (r315455): fix parsing of IP literals (square brackets)

PR:		212065, 217723
</pre>
</div>
</content>
</entry>
<entry>
<title>MFH (r310823): fix multi-line CONNECT responses</title>
<updated>2017-01-09T14:13:47+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2017-01-09T14:13:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=828a4289013bbdbfe8048697bbbd81e78537701b'/>
<id>828a4289013bbdbfe8048697bbbd81e78537701b</id>
<content type='text'>
PR:		194483
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR:		194483
</pre>
</div>
</content>
</entry>
<entry>
<title>r169386 (PR 112515) was incomplete: it treated 307 as an error except</title>
<updated>2016-05-31T08:27:39+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2016-05-31T08:27:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a5fc9a29bb6a5df7a9444a9d93408a6303195aee'/>
<id>a5fc9a29bb6a5df7a9444a9d93408a6303195aee</id>
<content type='text'>
in verbose mode, and did not handle 308 at all.

r241840 (PR 172451) added support for 308, but with the same bug.

Correctly handle both by recognizing them as redirects in all places
where we check the HTTP result code.

PR:		112515 173451 209546
Submitted by:	novel@
MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
in verbose mode, and did not handle 308 at all.

r241840 (PR 172451) added support for 308, but with the same bug.

Correctly handle both by recognizing them as redirects in all places
where we check the HTTP result code.

PR:		112515 173451 209546
Submitted by:	novel@
MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>Use strlcpy() instead of strncpy() to copy the string returned by</title>
<updated>2016-05-12T06:39:13+00:00</updated>
<author>
<name>Don Lewis</name>
<email>truckman@FreeBSD.org</email>
</author>
<published>2016-05-12T06:39:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=77b822dbc0f0223e5383b4377e1fa97657997d0d'/>
<id>77b822dbc0f0223e5383b4377e1fa97657997d0d</id>
<content type='text'>
setlocale() so that static analyzers know that the string is NUL
terminated.  This was causing a false positive in Coverity even
though the longest string returned by setlocale() is ENCODING_LEN
(31) and we are copying into a 64 byte buffer.  This change is also
a bit of an optimization since we don't need the strncpy() feature
of padding the rest of the destination buffer with NUL characters.

Reported by:	Coverity
CID:		974654
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
setlocale() so that static analyzers know that the string is NUL
terminated.  This was causing a false positive in Coverity even
though the longest string returned by setlocale() is ENCODING_LEN
(31) and we are copying into a 64 byte buffer.  This change is also
a bit of an optimization since we don't need the strncpy() feature
of padding the rest of the destination buffer with NUL characters.

Reported by:	Coverity
CID:		974654
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix double-free error: r289419 moved all error handling in http_connect()</title>
<updated>2016-02-11T17:48:15+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2016-02-11T17:48:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a982c4c7f5f7635683cb70577478397c38bef54b'/>
<id>a982c4c7f5f7635683cb70577478397c38bef54b</id>
<content type='text'>
to the end of the function, but did not remove a fetch_close() call which
was made redundant by the one in the shared error-handling code.

PR:		206774
Submitted by:	Christian Heckendorf &lt;heckendorfc@gmail.com&gt;
MFC after:	3 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to the end of the function, but did not remove a fetch_close() call which
was made redundant by the one in the shared error-handling code.

PR:		206774
Submitted by:	Christian Heckendorf &lt;heckendorfc@gmail.com&gt;
MFC after:	3 days
</pre>
</div>
</content>
</entry>
<entry>
<title>As a followup to r292330, standardize on size_t and add a few comments.</title>
<updated>2015-12-16T09:20:45+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2015-12-16T09:20:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=adc1aa7a29f88a8d58a0839248d48c69fb9b12c8'/>
<id>adc1aa7a29f88a8d58a0839248d48c69fb9b12c8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Reset bufpos to 0 immediately after refilling the buffer.  Otherwise, we</title>
<updated>2015-12-16T09:17:07+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2015-12-16T09:17:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a568844c6783d304c8e46b6ed545f4505264b9e5'/>
<id>a568844c6783d304c8e46b6ed545f4505264b9e5</id>
<content type='text'>
risk leaving the connection in an indeterminate state if the server fails
to send a chunk delimiter.  Depending on the application and on the sizes
of the preceding chunks, the result can be anything from missing data to a
segfault.  With this patch, it will be reported as a protocol error.

PR:		204771
MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
risk leaving the connection in an indeterminate state if the server fails
to send a chunk delimiter.  Depending on the application and on the sizes
of the preceding chunks, the result can be anything from missing data to a
segfault.  With this patch, it will be reported as a protocol error.

PR:		204771
MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix buildworld after r291453, similar to r284346: url-&gt;user and url-&gt;pwd</title>
<updated>2015-11-29T22:37:48+00:00</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2015-11-29T22:37:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a1b9b1743c20f6eb83a4a5499d4ed896fd417950'/>
<id>a1b9b1743c20f6eb83a4a5499d4ed896fd417950</id>
<content type='text'>
are arrays, so they can never be NULL.

Reported by:	many
Pointy hat to:	des
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
are arrays, so they can never be NULL.

Reported by:	many
Pointy hat to:	des
</pre>
</div>
</content>
</entry>
<entry>
<title>Use .netrc for HTTP sites and proxies, not just FTP.</title>
<updated>2015-11-29T14:26:59+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2015-11-29T14:26:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=4d8b056ef182f278d706e7528b871f0631e22a80'/>
<id>4d8b056ef182f278d706e7528b871f0631e22a80</id>
<content type='text'>
PR:		193740
Submitted by:	TEUBEL György &lt;tgyurci@gmail.com&gt;
MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR:		193740
Submitted by:	TEUBEL György &lt;tgyurci@gmail.com&gt;
MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix two bugs in HTTPS tunnelling:</title>
<updated>2015-10-16T12:21:44+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2015-10-16T12:21:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c3f9b93bd968e30a6d28db0cab1a36662833fe43'/>
<id>c3f9b93bd968e30a6d28db0cab1a36662833fe43</id>
<content type='text'>
 - If the proxy returns a non-200 result, set the error code accordingly
   so the caller / user gets a somewhat meaningful error message.
 - Consume and discard any HTTP response header following the result line.

PR:		194483
Tested by:	Fabian Keil &lt;fk@fabiankeil.de&gt;
MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 - If the proxy returns a non-200 result, set the error code accordingly
   so the caller / user gets a somewhat meaningful error message.
 - Consume and discard any HTTP response header following the result line.

PR:		194483
Tested by:	Fabian Keil &lt;fk@fabiankeil.de&gt;
MFC after:	1 week
</pre>
</div>
</content>
</entry>
</feed>
