Age | Commit message (Collapse) | Author |
|
Input and ok mortimer@
|
|
handler */
our snprintf is reentrant safe except for floating point.
Break the double apart into integer.integer notation, to avoid that.
ok kettenis millert
|
|
Fetch aborts through SIGINT (^C) print a message with fputs(3), but this
calls malloc() on its own, which is not supported from interrupt handler
context.
Fix it by using write(2) which avoids further memory allocations.
While here, merge abortfile() into the identical aborthttp() with a more
generic "fetch aborted." message for simplicity.
Spotted with vm.malloc_conf=SU and ^C on a port's "make fetch" causing
ftp(49660) in malloc(): recursive call
Abort trap (core dumped)
OK jca (who came up with using write(2) independently)
|
|
Consistently disarm the SIGINT handler on error, else a SIGINT can lead
to taking twice the cleanup path. Initial report by naddy@, ok tb@
|
|
|
|
ok yasuoka@
|
|
Not handling it is incorrect and can lead to credentials leaks in DNS
requests. The resulting growth is reasonable (about 300 bytes on
amd64).
ok yasuoka@
|
|
is work in progress.
|
|
First look for userinfo, and overwrite it to make sure it doesn't
reappears again later.
Then reset the path to fix the fragile mechanism that produces the full
request URI for the proxied connection case.
ok yazuoka@
|
|
https server with user/password through "http_proxy" environment
variable work properly.
ok jca
|
|
- allocate read buffer before setjmp(3) so that its value is properly
defined when longjmp(3) returns
- only mark as volatile variables modified after setjmp(3) and used
again after a possible return from longjmp(3)
|
|
Changes already present in file_get()
- no need to special case write(2) returning 0
- clearer loop condition
- fix read error detection and properly save errno
|
|
This is somewhat related to the "-b bind_addr" option some programs have,
which should get some cleanup also...
input florian claudio jmc
|
|
correctly. This would break ftp when the handshake doesn't complete in one
shot. (noticed when making tls 1.3 connections to cloudflare.cdn)
ok jsing@
|
|
Change several instances, most of them to the usual -width Ds.
|
|
The code is mostly duplicated already, handling local files here just
makes for more complex code. Split it out to its own function. This
mechanically prevents redirections to local files.
Positive feedback from Hiltjo Posthuma
|
|
Report and fix from Hiltjo Posthuma, input from and ok deraadt@
|
|
On SMALL builds ftp_printf is just a #define to avoid a size increase.
ok millert@
|
|
Input from deraadt@
|
|
Overlooked when shuffling the HTTP/1.1 code.
|
|
from Hiltjo Posthuma
|
|
|
|
|
|
Some sites in ports start to reject HTTP/1.0 requests. Let's move on
and implement HTTP/1.1. Should fit in ramdisks.
ok sthen@ tb@
|
|
Results in better code and a size decrease.
|
|
Set up two wrappers around tls_read/write to be used along with the
not-very-portable funopen(). This kills a bunch of local code, always
a nice thing for an utility which ends up in bsd.rd.
"seems legit" deraadt@, ok kn@
|
|
|
|
progname and produce better error messages
discussed with aja and jca
|
|
case it came via a redirect)
some help from jca, discussed with aja
|
|
with UTIME_OMIT for the atime, instead of setting the atime to the current
time.
ok jca@ cheloha@
|
|
Keeping it around uses both local and remote resources for no good reason.
ok job@
|
|
As a side effect this shuts down the TLS connection before closing the
underlying socket for redirectionss.
ok job@
|
|
We just bail out if the header is absent or if the server tells us to
wait. Prodding from job@, ok sthen@ deraadt@
|
|
Basic implementation: we just retry once, and make no attempt (yet) to
parse any Retry-After header.
The idea is to work around cdn.openbsd.org sometimes replying with a 503
for reasons unknown. According to juanfra@ it sets "Retry-After: 0" so
this minimal implementation should be enough.
Different diff from espie@, test case from sthen@, input from
millert@, ok millert@ deraadt@
|
|
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
|
|
|
|
We are juggling too many things at the moment and we can't deal with
the differences in behaviour right now.
|
|
is disabled.
Difference pointed out by deraadt
OK kurtm, sunil
|
|
Adjust the usage message of ftp(1) to reflect its two operating modes
and list missing flags.
OK florian@ jmc@
|
|
against the same outputs
ok kmos florian
|
|
|
|
Found the hard way by bluhm
Debugged with deraadt & bluhm
|
|
Like the old ftp. Discussed with at least with tedu@ "We should match
existing behavior at least for now"
|
|
|
|
Ok jca@
|
|
From Hiltjo Posthuma
|
|
from florian, ok jca
|
|
by using the login_info() function the other messages use.
OK florian@
|
|
okay jca@, jasper@
|
|
ok florian@ espie@
|