History log of /freebsd/lib/libfetch/http.c (Results 1 – 25 of 278)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/14.0.0
# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


Revision tags: release/13.2.0, release/12.4.0
# 57fbafb8 16-Nov-2022 John Baldwin <jhb@FreeBSD.org>

libfetch: Pass a zeroed digest to DigestCalcResponse.

GCC 12 warns that passing "" (a constant of char[1]) to a parameter of
type char[33] could potentially overread. It is not clear from the
conte

libfetch: Pass a zeroed digest to DigestCalcResponse.

GCC 12 warns that passing "" (a constant of char[1]) to a parameter of
type char[33] could potentially overread. It is not clear from the
context that c->qops can never be "auth-int" (and if it can't, then
the "auth-int" handling in DigestCalcResponse is dead code that should
be removed since this is the only place the function is called).

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D36825

show more ...


Revision tags: release/13.1.0
# ce700f78 20-Apr-2022 Stefan Eßer <se@FreeBSD.org>

libfetch: remove a set-but-not-uswed variable


Revision tags: release/12.3.0
# 635eb7ac 09-Sep-2021 Baptiste Daroussin <bapt@FreeBSD.org>

fetch: do not confuse capacity and length

The patch converting fetch to getline
(ee3ca711a898cf41330c320826ea1e0e6e451f1d),
did confuse the capacity of the line buffer with the actual len of the rea

fetch: do not confuse capacity and length

The patch converting fetch to getline
(ee3ca711a898cf41330c320826ea1e0e6e451f1d),
did confuse the capacity of the line buffer with the actual len of the read
line confusing fetch -v.

show more ...


# ee3ca711 17-Aug-2021 Daniel Kolesa <daniel@octaforge.org>

libfetch: use more portable getline() interface

this is for better portability in order to avoid using a function
which is BSD-only or available via libbsd

MFC after: 3 weeks


Revision tags: release/13.0.0
# 345c30a9 01-Apr-2021 Renato Botelho <garga@FreeBSD.org>

libfetch: Retry with proxy auth when server returns 407

PR: 220468
Submitted by: Egil Hasting <egil.hasting@higen.org> (based on)
Reviewed by: kevans, kp
Approved by: kp
MFC after: 2 weeks
Sponsore

libfetch: Retry with proxy auth when server returns 407

PR: 220468
Submitted by: Egil Hasting <egil.hasting@higen.org> (based on)
Reviewed by: kevans, kp
Approved by: kp
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D29533

show more ...


Revision tags: release/12.2.0, release/11.4.0, release/12.1.0
# c5c3ba6b 03-Sep-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r351317 through r351731.


# f4e05cc5 28-Aug-2019 Mark Johnston <markj@FreeBSD.org>

Document fetchReqHTTP().

Submitted by: Farhan Khan <khanzf@gmail.com>
Reviewed by: 0mp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D18788


Revision tags: release/11.3.0
# 67350cb5 09-Dec-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r340918 through r341763.


Revision tags: release/12.0.0
# a768df3e 27-Nov-2018 Dag-Erling Smørgrav <des@FreeBSD.org>

When deciding whether to send the complete URL or just the document part,
we were looking at the original URL rather than the one we were currently
processing. This meant that if we were trying to r

When deciding whether to send the complete URL or just the document part,
we were looking at the original URL rather than the one we were currently
processing. This meant that if we were trying to retrieve an HTTP URL but
were redirected to an HTTPS URL, and HTTPS proxying was enabled, we would
send an invalid request and most likely get garbage back.

MFC after: 3 days

show more ...


# ceedec4b 27-Nov-2018 Dag-Erling Smørgrav <des@FreeBSD.org>

A few more cases where strcasecmp() is no longer required.

MFC after: 1 week


Revision tags: release/11.2.0
# f2eac202 29-May-2018 Dag-Erling Smørgrav <des@FreeBSD.org>

Fix a few (but far from all) style issues.

MFC after: 3 weeks


# c5712d6d 29-May-2018 Dag-Erling Smørgrav <des@FreeBSD.org>

Use __VA_ARGS__ to simplify the DEBUG macro.

MFC after: 3 weeks


# b847b083 12-May-2018 Dag-Erling Smørgrav <des@FreeBSD.org>

Preserve if-modified-since timestamps across redirects.

PR: 224426
MFC after: 1 week


# 5e53a4f9 26-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

lib: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
pr

lib: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

show more ...


Revision tags: release/10.4.0, release/11.1.0
# 08a49957 17-Mar-2017 Dag-Erling Smørgrav <des@FreeBSD.org>

r308996 broke IP literals by assuming that a colon could only occur as
a separator between host and port, and using strchr() to search for it.
Rewrite fetch_resolve() so it handles bracketed literals

r308996 broke IP literals by assuming that a colon could only occur as
a separator between host and port, and using strchr() to search for it.
Rewrite fetch_resolve() so it handles bracketed literals correctly, and
remove similar code elsewhere to avoid passing unbracketed literals to
fetch_resolve(). Remove #ifdef INET6 so we still parse IP literals
correctly even if we do not have the ability to connect to them.

While there, fix an off-by-one error which caused HTTP 400 errors to be
misinterpreted as redirects.

PR: 217723
MFC after: 1 week
Reported by: bapt, bz, cem, ngie

show more ...


# c8453e5b 05-Mar-2017 Dag-Erling Smørgrav <des@FreeBSD.org>

Fix partial requests (used by fetch -r) when the requested file is
already complete.

Since 416 is an error code, any Content-Range header in the response
would refer to the error message, not the re

Fix partial requests (used by fetch -r) when the requested file is
already complete.

Since 416 is an error code, any Content-Range header in the response
would refer to the error message, not the requested document, so
relying on the value of size when we know we got a 416 is wrong.
Instead, just verify that offset == 0 and assume that we've reached
the end of the document (if offset > 0, we did not request a range,
and the server is screwing with us). Note that we cannot distinguish
between reaching the end and going past it, but that is a flaw in the
protocol, not in the code, so we just have to assume that the caller
knows what it's doing. A smart caller would request an offset
slightly before what it believes is the end and compare the result to
what is already in the file.

PR: 212065
Reported by: mandree
MFC after: 3 weeks

show more ...


# 21ca0912 30-Dec-2016 Dag-Erling Smørgrav <des@FreeBSD.org>

Fix inverted loop condition which broke multi-line responses to CONNECT.

PR: 194483
Submitted by: Miłosz Kaniewski <milosz.kaniewski@gmail.com>
MFC after: 1 week


Revision tags: release/11.0.1, release/11.0.0
# a5fc9a29 31-May-2016 Dag-Erling Smørgrav <des@FreeBSD.org>

r169386 (PR 112515) was incomplete: it treated 307 as an error except
in verbose mode, and did not handle 308 at all.

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

Correctly han

r169386 (PR 112515) was incomplete: it treated 307 as an error except
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

show more ...


# 77b822db 12-May-2016 Don Lewis <truckman@FreeBSD.org>

Use strlcpy() instead of strncpy() to copy the string returned by
setlocale() so that static analyzers know that the string is NUL
terminated. This was causing a false positive in Coverity even
thou

Use strlcpy() instead of strncpy() to copy the string returned by
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

show more ...


Revision tags: release/10.3.0
# 0fe0fe11 15-Feb-2016 Glen Barber <gjb@FreeBSD.org>

MFH

Sponsored by: The FreeBSD Foundation


# 4156ce4f 11-Feb-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r295351 through r295543.


# a982c4c7 11-Feb-2016 Dag-Erling Smørgrav <des@FreeBSD.org>

Fix double-free error: r289419 moved all error handling in http_connect()
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-h

Fix double-free error: r289419 moved all error handling in http_connect()
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 <heckendorfc@gmail.com>
MFC after: 3 days

show more ...


# b626f5a7 04-Jan-2016 Glen Barber <gjb@FreeBSD.org>

MFH r289384-r293170

Sponsored by: The FreeBSD Foundation


# 9a7cd2e6 22-Dec-2015 Bjoern A. Zeeb <bz@FreeBSD.org>

MFH @r292599

This includes the pluggable TCP framework and other chnages to the
netstack to track for VNET stability.

Security: The FreeBSD Foundation


12345678910>>...12