fetch: support keep-alive even if the HTTP server returns 304 (Not-Modified).
This commit is contained in:
parent
f78c2986d4
commit
15893caf0b
3
NEWS
3
NEWS
@ -1,5 +1,8 @@
|
||||
xbps-0.45 (???):
|
||||
|
||||
* libfetch: added support for keep-alive connections even if the HTTP server returns
|
||||
304 (Not Modified). This is a noticable performance improvement for `xbps-install -S`.
|
||||
|
||||
* xbps now autoupdates itself when there's a package update.
|
||||
|
||||
* xbps-uchroot(8): added -O option to use overlayfs to mount CHROOTDIR in
|
||||
|
@ -704,8 +704,6 @@ http_connect(struct url *URL, struct url *purl, const char *flags, int *cached)
|
||||
int val;
|
||||
#endif
|
||||
|
||||
*cached = 1;
|
||||
|
||||
#ifdef INET6
|
||||
af = AF_UNSPEC;
|
||||
#else
|
||||
@ -849,6 +847,7 @@ http_request(struct url *URL, const char *op, struct url_stat *us,
|
||||
length = -1;
|
||||
size = -1;
|
||||
mtime = 0;
|
||||
cached = 0;
|
||||
|
||||
/* check port */
|
||||
if (!url->port)
|
||||
@ -1166,7 +1165,7 @@ http_request(struct url *URL, const char *op, struct url_stat *us,
|
||||
URL->offset = offset;
|
||||
URL->length = clength;
|
||||
|
||||
if (clength == -1 && !chunked)
|
||||
if (clength == -1 && !chunked && conn->err != HTTP_NOT_MODIFIED)
|
||||
keep_alive = 0;
|
||||
|
||||
if (conn->err == HTTP_NOT_MODIFIED) {
|
||||
|
Loading…
Reference in New Issue
Block a user