| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Approved by: des, markm (mentor)(implicit)
|
|
|
|
| |
functional difference, but debugging output will be less confusing.
|
|
|
|
| |
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
closed through _fetch_close() which is the only one who knows the connection
REALLY was closed (since ref -> 0). However, FTP keeps its own local
cached_connection and checks if it is valid by comparing it to NULL. This
is bogus since it may have been freed elsewhere by _fetch_close().
This change checks if we are closing the cached_connection and the ref is 1
(soon to be 0). If so, set cached_connection to NULL so we don't
accidentally reuse it. The REAL fix should be to move connection caching
to the common.c level (_fetch_* functions) and NULL the cache(s) in
_fetch_close(). Then all layers could benefit from caching.
|
|
|
|
|
| |
the heap block does not get freed and reused. This should fix the
pkg_add -r crashes that have been happening for months.
|
|
|
|
| |
Tell ftp that _fetch_connect() always sets the error code (http already knew)
|
|
|
|
|
|
|
| |
scope identifier).
Approved by: des
MFC after: 3 weeks
|
|
|
|
| |
free a cached FTP connection.
|
|
|
|
|
| |
(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.
|
| |
|
|
|
|
|
| |
ftp.c and http.c now have exceedingly long lines due to deep nesting;
this will be corrected by reorganizing the code in a later revision.
|
|
|
|
|
| |
PR: misc/34043
MFC after: 2 weeks
|
|
|
|
|
|
|
| |
default.
PR: 32988
MFC after: 3 days
|
| |
|
|
|
|
|
| |
ages - some of which wouldn't be necessary if gcc wasn't broken or TPTB were
willing to do something (-fno-builtin) about it.
|
| |
|
|
|
|
| |
MFC after: 2 weeks
|
|
|
|
| |
Spotted by: bde
|
|
|
|
| |
MFC after: 2 weeks
|
|
|
|
| |
fixes a bug in pkg_add(1) (which nobody noticed because of another bug).
|
| |
|
|
|
|
| |
PR: 27506
|
|
|
|
| |
Fix some other minor glitches.
|
|
|
|
| |
to -1 so the caller will know it's invalid. This is an MFC candidate.
|
|
|
|
| |
that forces the ftp code to use the low (default) port range instead.
|
| |
|
|
|
|
| |
PR: bin/25494
|
|
|
|
|
|
| |
Rather than have a separate (misnamed) FTP_ANONYMOUS_PASSWORD constant, use
FTP_ANONYMOUS_USER (i.e. "anonymous") to construct the anonymous ftp password
if getlogin() fails.
|
|
|
|
| |
FTP_ANONYMOUS_USER.
|
|
|
|
|
|
|
| |
and had libfetch selecting passive mode even when FTP_PASSIVE_MODE was not
set at all, which is really quite surprising unless you know about it. So
change it to the agreed default behaviour of selecting passive mode if
FTP_PASSIVE_MODE is set, but not "no".
|
|
|
|
| |
to HTTP if HTTP_PROXY was used instead.
|
|
|
|
| |
multiline response (proper fix this time).
|
| |
|
|
|
|
| |
response.
|
|
|
|
|
|
| |
in order to avoid this bug in the future.
Submitted by: se
|
| |
|
| |
|
|
|
|
| |
even giving me 24 hours to read his mail and find the bug.
|
|
|
|
| |
dereferenceing it". This fixes ``pkg_add -r''.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- ftpTimeout was not honored when reading actual data, as opposed to
talking protocol
- connection caching was broken because _ftp_cached_connect() would see
the result of the transfer instead of the result of the NOOP.
- if the RETR succeeded, but an error occurred later (as can happen
when talking to a proxy), the error would not be detected.
There still remains to register an atexit(3) callback to close the cached
connection gracefully instead of just dropping it on the floor.
|
| |
|
| |
|
|
|
|
| |
As a side effect, remove a lot of duplicate and now redundant code.
|
|
|
|
|
|
| |
Microsoft FTP Service.
Reported by: asmodai, eivind
|
|
|
|
|
|
|
| |
means that the server doesn't understand SIZE or MDTM, which should not be a
hard failure.
Submitted by: ume
|
|
|
|
|
|
|
|
|
| |
a bug in some ftp servers (most notably ftp.vmunix.com) which report the
size of a file correctly in ascii mode, but report it as 0 in binary mode.
Reported by: asmodai
Also remove an unneeded initialization.
|
|
|
|
|
| |
Work around YA Apache bug: don't send port in Host: header if it's the
default port.
|