summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2022-07-14 19:35:18 -0600
committerEduardo Chappa <chappa@washington.edu>2022-07-14 19:35:18 -0600
commit8b55be9f989f88aa0f464ec1c5f7dbef70310055 (patch)
tree4697f0d8e5344ae351d8c4fe650043aa122a5c20
parent8444b4270da7e23bfa17fb29fa86da946ad9cff6 (diff)
downloadalpine-8b55be9f989f88aa0f464ec1c5f7dbef70310055.tar.xz
* Improvements in the http code in processing http headers.
-rw-r--r--imap/src/c-client/http.c10
-rw-r--r--pith/pine.hlp2
2 files changed, 7 insertions, 5 deletions
diff --git a/imap/src/c-client/http.c b/imap/src/c-client/http.c
index bb0f34d4..d291c975 100644
--- a/imap/src/c-client/http.c
+++ b/imap/src/c-client/http.c
@@ -1124,10 +1124,12 @@ http_reply (HTTPSTREAM *stream)
if(stream->header->content_length){
size = atol(stream->header->content_length->p->vp->value);
if (stream->response) fs_give ((void **) &stream->response);
- stream->response = (unsigned char *) net_getsize (stream->netstream, size);
- if(stream->response){
- buffer_add(&stream->reply, stream->response);
- if(stream->debug) mm_log(stream->response, HTTPDEBUG);
+ if(size > 0L){
+ stream->response = (unsigned char *) net_getsize (stream->netstream, size);
+ if(stream->response){
+ buffer_add(&stream->reply, stream->response);
+ if(stream->debug) mm_log(stream->response, HTTPDEBUG);
+ }
}
}
else if (stream->header->transfer_encoding){
diff --git a/pith/pine.hlp b/pith/pine.hlp
index e89383c6..74c2d257 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -147,7 +147,7 @@ with help text for the config screen and the composer that didn't have any
reasonable place to be called from.
Dummy change to get revision in pine.hlp
============= h_revision =================
-Alpine Commit 657 2022-07-04 11:28:11
+Alpine Commit 658 2022-07-14 19:34:49
============= h_news =================
<HTML>
<HEAD>