<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libfetch, branch releng/14.2</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>libfetch: don't include fragments in HTTP requests</title>
<updated>2024-09-05T14:05:15+00:00</updated>
<author>
<name>Pietro Cerutti</name>
<email>gahr@FreeBSD.org</email>
</author>
<published>2024-08-21T12:35:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ab7a79806e3103accb1ba2d89ba51e977704a2e3'/>
<id>ab7a79806e3103accb1ba2d89ba51e977704a2e3</id>
<content type='text'>
Fragments are reserved for client-side processing, see
https://www.rfc-editor.org/rfc/rfc9110.html#section-7.1

Also, some servers don't like to receive HTTP requests with fragments.

```
$ fetch 'https://dropbox.com/a/b'
fetch: https://dropbox.com/a/b: Not Found

$ fetch 'https://dropbox.com/a/b#'
fetch: https://dropbox.com/a/b#: Bad Request
```

This is a real-world scenario, where some download link from dropbox
(eventually) redirects to an URL with a fragment:

```
$ fetch -v 'https://www.dropbox.com/sh/&lt;some&gt;/&lt;thing&gt;?dl=1' 2&gt;&amp;1 | grep requesting
requesting https://www.dropbox.com/sh/&lt;some&gt;/&lt;thing&gt;?dl=1
requesting https://www.dropbox.com/scl/fo/&lt;foo&gt;/&lt;bar&gt;?rlkey=&lt;baz&gt;&amp;dl=1
requesting https://&lt;boo&gt;.dl.dropboxusercontent.com/zip_download_get/&lt;some-long-strig&gt;#
```

See how the last redirect ends with a `#`.

Currently, libfetch includes the ending fragment and makes it impossible
to download the file.

Differential Revision:	https://reviews.freebsd.org/D46318
MFC after:		2 weeks

(cherry picked from commit 1af7d5f389536a2f391153513d95d92ffdf360e4)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fragments are reserved for client-side processing, see
https://www.rfc-editor.org/rfc/rfc9110.html#section-7.1

Also, some servers don't like to receive HTTP requests with fragments.

```
$ fetch 'https://dropbox.com/a/b'
fetch: https://dropbox.com/a/b: Not Found

$ fetch 'https://dropbox.com/a/b#'
fetch: https://dropbox.com/a/b#: Bad Request
```

This is a real-world scenario, where some download link from dropbox
(eventually) redirects to an URL with a fragment:

```
$ fetch -v 'https://www.dropbox.com/sh/&lt;some&gt;/&lt;thing&gt;?dl=1' 2&gt;&amp;1 | grep requesting
requesting https://www.dropbox.com/sh/&lt;some&gt;/&lt;thing&gt;?dl=1
requesting https://www.dropbox.com/scl/fo/&lt;foo&gt;/&lt;bar&gt;?rlkey=&lt;baz&gt;&amp;dl=1
requesting https://&lt;boo&gt;.dl.dropboxusercontent.com/zip_download_get/&lt;some-long-strig&gt;#
```

See how the last redirect ends with a `#`.

Currently, libfetch includes the ending fragment and makes it impossible
to download the file.

Differential Revision:	https://reviews.freebsd.org/D46318
MFC after:		2 weeks

(cherry picked from commit 1af7d5f389536a2f391153513d95d92ffdf360e4)
</pre>
</div>
</content>
</entry>
<entry>
<title>libfetch: parse scheme://domain:/ correctly</title>
<updated>2024-04-03T19:11:58+00:00</updated>
<author>
<name>Ka Ho Ng</name>
<email>khng@FreeBSD.org</email>
</author>
<published>2024-03-25T20:10:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=72c3d91294c4d9c46c8185f90cba522f539d1051'/>
<id>72c3d91294c4d9c46c8185f90cba522f539d1051</id>
<content type='text'>
This improves URL-parsing compability with cURL, and unbreaks parsing of
similar kinds of URLs after commit 8d9de5b10a24.

Sponsored by:	Juniper Networks, Inc.
Reviewed by:	des
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D44493

(cherry picked from commit fb860ed0c52c2c1e7792ef86718620a439663c7f)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This improves URL-parsing compability with cURL, and unbreaks parsing of
similar kinds of URLs after commit 8d9de5b10a24.

Sponsored by:	Juniper Networks, Inc.
Reviewed by:	des
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D44493

(cherry picked from commit fb860ed0c52c2c1e7792ef86718620a439663c7f)
</pre>
</div>
</content>
</entry>
<entry>
<title>libfetch, fetch: Stop recommending the use of ca_root_nss.</title>
<updated>2023-12-13T16:23:57+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2023-10-08T04:35:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6d0ea82cc2520726e49d9f03e1b67734608139e7'/>
<id>6d0ea82cc2520726e49d9f03e1b67734608139e7</id>
<content type='text'>
MFC after:	3 days
Reviewed by:	kevans, emaste
Differential Revision:	https://reviews.freebsd.org/D42119

(cherry picked from commit 2821a7498f65d357c68166e1978b491abef1ca4a)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MFC after:	3 days
Reviewed by:	kevans, emaste
Differential Revision:	https://reviews.freebsd.org/D42119

(cherry picked from commit 2821a7498f65d357c68166e1978b491abef1ca4a)
</pre>
</div>
</content>
</entry>
<entry>
<title>libfetch: don't rely on ca_root_nss for certificate validation</title>
<updated>2023-10-05T00:03:16+00:00</updated>
<author>
<name>Michael Osipov</name>
<email>michael.osipov@siemens.com</email>
</author>
<published>2023-10-03T05:53:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fb058a9a40a5adc82721ed822fb4fba213446a7b'/>
<id>fb058a9a40a5adc82721ed822fb4fba213446a7b</id>
<content type='text'>
Before certctl(8), there was no system trust store, and libfetch
relied on the CA certificate bundle from the ca_root_nss port to
verify peers.

We now have a system trust store and a reliable mechanism for
manipulating it (to explicitly add, remove, or revoke certificates),
but if ca_root_nss is installed, libfetch will still prefer that to
the system trust store.

With this change, unless explicitly overridden, libfetch will rely on
OpenSSL to pick up the default system trust store.

PR:		256902
MFC after:	3 days
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D42059

(cherry picked from commit 09f5c1e118bb4eca77b83a0d08f559b20f60aa59)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before certctl(8), there was no system trust store, and libfetch
relied on the CA certificate bundle from the ca_root_nss port to
verify peers.

We now have a system trust store and a reliable mechanism for
manipulating it (to explicitly add, remove, or revoke certificates),
but if ca_root_nss is installed, libfetch will still prefer that to
the system trust store.

With this change, unless explicitly overridden, libfetch will rely on
OpenSSL to pick up the default system trust store.

PR:		256902
MFC after:	3 days
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D42059

(cherry picked from commit 09f5c1e118bb4eca77b83a0d08f559b20f60aa59)
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: two-line nroff pattern</title>
<updated>2023-08-16T17:55:10+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fa9896e082a1046ff4fbc75fcba4d18d1f2efc19'/>
<id>fa9896e082a1046ff4fbc75fcba4d18d1f2efc19</id>
<content type='text'>
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-16T17:55:03+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf'/>
<id>d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line .c pattern</title>
<updated>2023-08-16T17:54:42+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1d386b48a555f61cb7325543adbbb5c3f3407a66'/>
<id>1d386b48a555f61cb7325543adbbb5c3f3407a66</id>
<content type='text'>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: two-line .h pattern</title>
<updated>2023-08-16T17:54:16+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b3e7694832e81d7a904a10f525f8797b753bf0d3'/>
<id>b3e7694832e81d7a904a10f525f8797b753bf0d3</id>
<content type='text'>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>libfetch: remove all old OpenSSL support</title>
<updated>2023-06-24T08:45:02+00:00</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2023-06-22T03:53:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=bc1027a7785166fde9c2a3b48e6e70d198377d4b'/>
<id>bc1027a7785166fde9c2a3b48e6e70d198377d4b</id>
<content type='text'>
This change removes pre-OpenSSL 1.1 supporting code and removes/adjusted
preprocessor conditionals which were tautilogically true as FreeBSD main
has shipped with OpenSSL 1.1+ for some time.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D40711
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change removes pre-OpenSSL 1.1 supporting code and removes/adjusted
preprocessor conditionals which were tautilogically true as FreeBSD main
has shipped with OpenSSL 1.1+ for some time.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D40711
</pre>
</div>
</content>
</entry>
<entry>
<title>libfetch: specify OpenSSL 1.1 APIs</title>
<updated>2023-05-25T17:15:45+00:00</updated>
<author>
<name>Pierre Pronchery</name>
<email>pierre@freebsdfoundation.org</email>
</author>
<published>2023-05-25T06:46:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=77d788e23d0964053b81b5de307fa04bd1ccadc5'/>
<id>77d788e23d0964053b81b5de307fa04bd1ccadc5</id>
<content type='text'>
OPENSSL_API_COMPAT can be used to specify the OpenSSL API version in
use for the purpose of hiding deprecated interfaces and enabling
the appropriate deprecation notices.

This change is a NFC while we're still using OpenSSL 1.1.1 but will
avoid deprecation warnings upon the switch to OpenSSL 3.0.

Future work should migrate to use the OpenSSL 3.0 APIs.

PR:		271615
Reviewed by:	emaste
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OPENSSL_API_COMPAT can be used to specify the OpenSSL API version in
use for the purpose of hiding deprecated interfaces and enabling
the appropriate deprecation notices.

This change is a NFC while we're still using OpenSSL 1.1.1 but will
avoid deprecation warnings upon the switch to OpenSSL 3.0.

Future work should migrate to use the OpenSSL 3.0 APIs.

PR:		271615
Reviewed by:	emaste
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation
</pre>
</div>
</content>
</entry>
</feed>
