| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
PR: 193871
Approved by: re (gjb)
|
|
|
|
|
|
|
|
|
|
|
| |
MFH (r285141): remove unused variable
MFH (r288217): correctly check return value from getaddrinfo(3)
MFH (r289419): fix bugs in HTTPS tunnelling
MFH (r289420): use fopen()'s "e" mode instead of fcntl for close-on-exec
MFH (r291453, r291461): use .netrc for http servers and proxies
MFH (r292330, r292332): reset bufpos to 0 after refilling in chunked mode
PR: 194483 199801 193740 204771
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Use NULL instead of 0 (Patch by Sascha Wildner <saw at online.de> for Dragonfly)
Remove unnecessary semicolons (Patch by Sascha Wildner <saw at online.de> for Dragonfly)
Add support for arbitrary http requests [1]
Support EAGAIN in fetch_writev
Submitted by: Alex Hornung <alex at alexhornung.com> [1]
Reviewed by: des
|
| |
|
|
|
|
|
| |
MFH (r261230, r261263): fix buffering issues
MFH (r261284): bump copyright
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support SNI in libfetch
SNI is Server Name Indentification which is a protocol for TLS that
indicates the host that is being connected to at the start of the
handshake. It allows to use Virtual Hosts on HTTPS.
PR: kern/183583
Approved by: bapt (implicit)
Approved by: re (gjb)
|
|
|
|
|
|
|
|
| |
imrovements; complete details in the PR.
PR: kern/175514
Submitted by: Michael Gmelin <freebsd@grem.de>
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
| |
To avoid unexpected process termination from SIGPIPE when writing to a
closed network connection, enable SO_NOSIGPIPE on all network connections.
The POSIX standard MSG_NOSIGNAL is not used since it requires modifying all
send calls to add this flag. This is particularly nasty for SSL connections.
Reviewed by: des
Tested by: bapt
MFC after: 5 days
|
|
|
|
|
|
|
|
|
| |
when there is no timeout, because read(2) will return immediately if there
is no data waiting in the TCP buffer, causing fetch_read() to busy-loop on
slow connections.
MFC after: 3 weeks
Noticed by: Yanhui Shen <shen.elf@gmail.com>
|
|
|
|
| |
MFC after: 3 weeks
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
progress information. The first is that fetch_read() (used in the HTTP
code but not the FTP code) can enter an infinite loop if it has previously
been interrupted by a signal. The second is that when it is interrupted,
fetch_read() will discard any data it may have read up to that point.
Luckily, both bugs are extremely timing-sensitive and therefore difficult
to trigger.
PR: bin/153240
Submitted by: Mark <markjdb@gmail.com>
MFC after: 3 weeks
|
| |
|
| |
|
|
|
|
|
| |
PR: bin/151866
MFC after: 3 weeks
|
|
|
|
|
|
|
| |
used, to fix warning if WITH_SSL is not set.
Submitted by: Sean Bruno
MFC after: 1 week
|
|
|
|
|
|
|
|
|
| |
avoid a hang in the SSL case if the server sends a close notification
before we are done reading. In the non-SSL case, it can provide a
minor (but probably not noticeable) performance improvement for small
transfers.
MFC after: 3 weeks
|
|
|
|
|
|
| |
Approved by: des
Obtained from: Xavier Heiny <xavier.heiny@netasq.com>
MFC after: 3 weeks
|
|
|
|
|
|
|
|
|
|
|
| |
counted in the width specification in scanf.
This is not a security problem, since this function is only used to
parse a user's configuration file.
Submitted by: Joerg Sonnenberger
Obtained from: dragonflybsd
MFC after: 1 week
|
|
|
|
| |
MFC after: 2 weeks
|
|
|
|
|
| |
Submitted by: Joerg Sonnenberger <joerg@britannica.bec.de>
MFC after: 2 weeks
|
|
|
|
|
|
|
| |
way (not for the first time...)
Noticed by: bde, ru ++
MFC after: 1 week
|
|
|
|
|
|
|
|
|
| |
lynx, curl etc. Note that this patch differs significantly from that
in the PR, as the submitter refined it after submitting the PR.
PR: 110388
Submitted by: Alexander Pohoyda <alexander.pohoyda@gmx.net>
MFC after: 3 weeks
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
| |
free the connection buffer as well.
PR: bin/76153
MFC after: 1 week
|
| |
|
| |
|
|
|
|
|
|
| |
specifying a local address to bind sockets to. Caveat: lightly tested.
PR: bin/37572
|
|
|
|
| |
MFC after: 3 days
|
| |
|
| |
|
|
|
|
|
| |
Submitted by: Andre Albsmeier <andre.albsmeier@siemens.com>
MFC after: 7 days
|
|
|
|
| |
Submitted by: fenner
|
|
|
|
| |
Change the type and name of a variable introduced in 1.33.
|
|
|
|
|
|
|
|
| |
the root cause of the bus errors I was experiencing.
Submitted by: fenner
Tested by: obrien
Prompted by: peter
|
|
|
|
|
| |
Revs 1.37-8 produce a bus error in some environments.
Revs 1.34-6 do not bus error, but write corrupted files.
|
|
|
|
|
|
|
|
|
| |
_fetch_writev() to incorrectly report EPIPE in certain cases.
Also fix a number of const warnings by using __DECONST(), plus a signed /
unsigned comparison by casting the rhs to ssize_t.
Submitted by: fenner, Craig Rodrigues <rodrigc@attbi.com>
|
|
|
|
|
|
| |
error, only report an error if no data was read at all (unless len was
0 to start with). Otherwise, the final read of practically any transfer
will end in a fatal error.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the SSL case, it is no different from the old _fetch_write(), but in the
non-SSL case it uses writev(2) to send the entire vector as a single
packet (provided it can fit in one packet). Implement _fetch_write()
and _fetch_putln() in terms of _fetch_writev().
This should improve performance in the non-SSL case (by reducing protocol
overhead) and solve the problem where too-smart-for-their-own-good
firewalls reject FTP packets that do not end in CRLF.
PR: bin/44123
Submitted by: fenner
|
|
|
|
|
|
|
|
| |
not initialized before use, and _http_growbuf() did not return a value
on success.
Reported by: Peter Edwards <pmedwards@eircom.net>
MFC after: 2 weeks
|
|
|
|
|
|
|
| |
symptoms: make timeouts and short transfers fatal, and set errno to an
appropriate value (ETIMEDOUT for a timeout, EPIPE for a short transfer).
MFC after: 2 weeks
|
|
|
|
|
| |
connection is broken), take this into account and return at this
point.
|
|
|
|
| |
Tell ftp that _fetch_connect() always sets the error code (http already knew)
|
| |
|
|
|
|
| |
free a cached FTP connection.
|
| |
|
|
|
|
| |
Submitted by: Henry Whincup <henry@techiebod.com> (in principle)
|
|
|
|
|
| |
(except for DNS operations). Always use funopen() for HTTP, to support
both timeouts and SSL.
|
|
|
|
|
|
|
|
|
|
| |
which contains the socket descriptor, the input buffer and (yet unused)
SSL state variables. This has the neat side effect of greatly improving
reentrance (though we're not *quite* there yet) and opening the door to
HTTP connection caching.
This commit is inspired by email conversations with and patches from
Henry Whincup <henry@techiebod.com> last fall.
|
| |
|