History log of /freebsd-14.2/lib/libfetch/http.c (Results 1 – 25 of 140)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0
# 1d386b48 16-Aug-2023 Warner Losh <[email protected]>

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 <[email protected]>

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 <[email protected]>

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


Revision tags: release/12.3.0
# 635eb7ac 09-Sep-2021 Baptiste Daroussin <[email protected]>

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 <[email protected]>

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 <[email protected]>

libfetch: Retry with proxy auth when server returns 407

PR: 220468
Submitted by: Egil Hasting <[email protected]> (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 <[email protected]> (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
# f4e05cc5 28-Aug-2019 Mark Johnston <[email protected]>

Document fetchReqHTTP().

Submitted by: Farhan Khan <[email protected]>
Reviewed by: 0mp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D18788


Revision tags: release/11.3.0, release/12.0.0
# a768df3e 27-Nov-2018 Dag-Erling Smørgrav <[email protected]>

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 <[email protected]>

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 <[email protected]>

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

MFC after: 3 weeks


# c5712d6d 29-May-2018 Dag-Erling Smørgrav <[email protected]>

Use __VA_ARGS__ to simplify the DEBUG macro.

MFC after: 3 weeks


# b847b083 12-May-2018 Dag-Erling Smørgrav <[email protected]>

Preserve if-modified-since timestamps across redirects.

PR: 224426
MFC after: 1 week


# 5e53a4f9 26-Nov-2017 Pedro F. Giffuni <[email protected]>

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 <[email protected]>

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 <[email protected]>

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 <[email protected]>

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

PR: 194483
Submitted by: Miłosz Kaniewski <[email protected]>
MFC after: 1 week


Revision tags: release/11.0.1, release/11.0.0
# a5fc9a29 31-May-2016 Dag-Erling Smørgrav <[email protected]>

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 <[email protected]>

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
# a982c4c7 11-Feb-2016 Dag-Erling Smørgrav <[email protected]>

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 <[email protected]>
MFC after: 3 days

show more ...


# adc1aa7a 16-Dec-2015 Dag-Erling Smørgrav <[email protected]>

As a followup to r292330, standardize on size_t and add a few comments.


# a568844c 16-Dec-2015 Dag-Erling Smørgrav <[email protected]>

Reset bufpos to 0 immediately after refilling the buffer. Otherwise, we
risk leaving the connection in an indeterminate state if the server fails
to send a chunk delimiter. Depending on the applica

Reset bufpos to 0 immediately after refilling the buffer. Otherwise, we
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

show more ...


# a1b9b174 29-Nov-2015 Dimitry Andric <[email protected]>

Fix buildworld after r291453, similar to r284346: url->user and url->pwd
are arrays, so they can never be NULL.

Reported by: many
Pointy hat to: des


# 4d8b056e 29-Nov-2015 Dag-Erling Smørgrav <[email protected]>

Use .netrc for HTTP sites and proxies, not just FTP.

PR: 193740
Submitted by: TEUBEL György <[email protected]>
MFC after: 1 week


# c3f9b93b 16-Oct-2015 Dag-Erling Smørgrav <[email protected]>

Fix two bugs in HTTPS tunnelling:
- 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

Fix two bugs in HTTPS tunnelling:
- 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 <[email protected]>
MFC after: 1 week

show more ...


Revision tags: release/10.2.0
# ddcc2ecb 04-Jul-2015 Marcelo Araujo <[email protected]>

Remove unused variable to silence clang warning.

Differential Revision: D2683
Reviewed by: rodrigc, bapt


123456