mirror of
https://github.com/curl/curl.git
synced 2025-02-23 15:10:03 +08:00
parent
f4b85d24b2
commit
5c932f8fe9
@ -985,7 +985,8 @@ new_unencoding_writer(struct Curl_easy *data,
|
|||||||
return writer;
|
return writer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write data using an unencoding writer stack. */
|
/* Write data using an unencoding writer stack. "nbytes" is not
|
||||||
|
allowed to be 0. */
|
||||||
CURLcode Curl_unencode_write(struct Curl_easy *data,
|
CURLcode Curl_unencode_write(struct Curl_easy *data,
|
||||||
struct contenc_writer *writer,
|
struct contenc_writer *writer,
|
||||||
const char *buf, size_t nbytes)
|
const char *buf, size_t nbytes)
|
||||||
|
13
lib/pop3.c
13
lib/pop3.c
@ -1515,8 +1515,17 @@ CURLcode Curl_pop3_write(struct Curl_easy *data, char *str, size_t nread)
|
|||||||
if(prev) {
|
if(prev) {
|
||||||
/* If the partial match was the CRLF and dot then only write the CRLF
|
/* If the partial match was the CRLF and dot then only write the CRLF
|
||||||
as the server would have inserted the dot */
|
as the server would have inserted the dot */
|
||||||
result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)POP3_EOB,
|
if(strip_dot && prev - 1 > 0) {
|
||||||
strip_dot ? prev - 1 : prev);
|
result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)POP3_EOB,
|
||||||
|
prev - 1);
|
||||||
|
}
|
||||||
|
else if(!strip_dot) {
|
||||||
|
result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)POP3_EOB,
|
||||||
|
prev);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
result = CURLE_OK;
|
||||||
|
}
|
||||||
|
|
||||||
if(result)
|
if(result)
|
||||||
return result;
|
return result;
|
||||||
|
@ -604,7 +604,7 @@ static CURLcode chop_write(struct Curl_easy *data,
|
|||||||
/* Curl_client_write() sends data to the write callback(s)
|
/* Curl_client_write() sends data to the write callback(s)
|
||||||
|
|
||||||
The bit pattern defines to what "streams" to write to. Body and/or header.
|
The bit pattern defines to what "streams" to write to. Body and/or header.
|
||||||
The defines are in sendf.h of course.
|
The defines are in sendf.h of course. "len" is not allowed to be 0.
|
||||||
|
|
||||||
If CURL_DO_LINEEND_CONV is enabled, data is converted IN PLACE to the
|
If CURL_DO_LINEEND_CONV is enabled, data is converted IN PLACE to the
|
||||||
local character encoding. This is a problem and should be changed in
|
local character encoding. This is a problem and should be changed in
|
||||||
|
@ -830,7 +830,7 @@ static CURLcode readwrite_data(struct Curl_easy *data,
|
|||||||
Make sure that ALL_CONTENT_ENCODINGS contains all the
|
Make sure that ALL_CONTENT_ENCODINGS contains all the
|
||||||
encodings handled here. */
|
encodings handled here. */
|
||||||
if(data->set.http_ce_skip || !k->writer_stack) {
|
if(data->set.http_ce_skip || !k->writer_stack) {
|
||||||
if(!k->ignorebody) {
|
if(!k->ignorebody && nread) {
|
||||||
#ifndef CURL_DISABLE_POP3
|
#ifndef CURL_DISABLE_POP3
|
||||||
if(conn->handler->protocol & PROTO_FAMILY_POP3)
|
if(conn->handler->protocol & PROTO_FAMILY_POP3)
|
||||||
result = Curl_pop3_write(data, k->str, nread);
|
result = Curl_pop3_write(data, k->str, nread);
|
||||||
@ -840,7 +840,7 @@ static CURLcode readwrite_data(struct Curl_easy *data,
|
|||||||
nread);
|
nread);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(!k->ignorebody)
|
else if(!k->ignorebody && nread)
|
||||||
result = Curl_unencode_write(data, k->writer_stack, k->str, nread);
|
result = Curl_unencode_write(data, k->writer_stack, k->str, nread);
|
||||||
}
|
}
|
||||||
k->badheader = HEADER_NORMAL; /* taken care of now */
|
k->badheader = HEADER_NORMAL; /* taken care of now */
|
||||||
|
Loading…
Reference in New Issue
Block a user