mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix #429: Also fix end of transfer for http download of auth zones.
This commit is contained in:
parent
f3dcb297d9
commit
ff0c5f863d
2 changed files with 6 additions and 3 deletions
|
|
@ -1,3 +1,6 @@
|
|||
25 March 2021: Wouter
|
||||
- Fix #429: Also fix end of transfer for http download of auth zones.
|
||||
|
||||
24 March 2021: Wouter
|
||||
- Fix deprecation test to work for iOS TVOS and WatchOS, it uses
|
||||
CFLAGS and CPPFLAGS and also checks if the item is unavailable.
|
||||
|
|
|
|||
|
|
@ -2401,7 +2401,7 @@ http_process_chunk_header(struct comm_point* c)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/** handle nonchunked data segment */
|
||||
/** handle nonchunked data segment, 0=fail, 1=wait */
|
||||
static int
|
||||
http_nonchunk_segment(struct comm_point* c)
|
||||
{
|
||||
|
|
@ -2410,7 +2410,7 @@ http_nonchunk_segment(struct comm_point* c)
|
|||
* we are looking to read tcp_byte_count more data
|
||||
* and then the transfer is done. */
|
||||
size_t remainbufferlen;
|
||||
size_t got_now = sldns_buffer_limit(c->buffer) - c->http_stored;
|
||||
size_t got_now = sldns_buffer_limit(c->buffer);
|
||||
if(c->tcp_byte_count <= got_now) {
|
||||
/* done, this is the last data fragment */
|
||||
c->http_stored = 0;
|
||||
|
|
@ -2419,7 +2419,6 @@ http_nonchunk_segment(struct comm_point* c)
|
|||
(void)(*c->callback)(c, c->cb_arg, NETEVENT_DONE, NULL);
|
||||
return 1;
|
||||
}
|
||||
c->tcp_byte_count -= got_now;
|
||||
/* if we have the buffer space,
|
||||
* read more data collected into the buffer */
|
||||
remainbufferlen = sldns_buffer_capacity(c->buffer) -
|
||||
|
|
@ -2435,6 +2434,7 @@ http_nonchunk_segment(struct comm_point* c)
|
|||
}
|
||||
/* call callback with this data amount, then
|
||||
* wait for more */
|
||||
c->tcp_byte_count -= got_now;
|
||||
c->http_stored = 0;
|
||||
sldns_buffer_set_position(c->buffer, 0);
|
||||
fptr_ok(fptr_whitelist_comm_point(c->callback));
|
||||
|
|
|
|||
Loading…
Reference in a new issue