Skip to content
Snippets Groups Projects
Commit c35aa0bc authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix two (more) bugs with Web Lists

1 - If cache-control header had more than one option, an infinite
    loop would occur.
2 - For TLS, if the remote closes the connection after the transfer,
    a "Complete" error would occur.

Together, these should fox ticket 191
parent da951220
No related branches found
No related tags found
No related merge requests found
Pipeline #8188 passed
......@@ -159,7 +159,10 @@ recv_nbytes(struct http_session *sess, uint8_t *buf, const size_t chunk_size, bo
#ifndef WITHOUT_CRYPTLIB
int copied = 0;
int status = cryptPopData(sess->tls, &buf[received], chunk_size - received, &copied);
if (cryptStatusError(status)) {
if (status == CRYPT_ERROR_COMPLETE) {
// We're done here...
}
else if (cryptStatusError(status)) {
set_msgf(sess->req, "Error %d Popping Data", status);
goto error_return;
}
......@@ -596,7 +599,7 @@ parse_cache_control(struct http_session *sess, const char *val)
if (sz == 15 && sep == NULL && strnicmp(val, "must-revalidate", 15) == 0) {
sess->cache.must_revalidate = true;
}
val = end;
val = end + 1;
}
return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment