curl-library
[PATCH] transfer.c fixes for CURL_DO_LINEEND_CONV and non-ASCII platform HTTP requests
Date: Thu, 30 Apr 2009 18:49:21 -0600
While testing using the Curl test suite on TPF I uncovered a rather
complicated problem:
If the HTTP request headers can't be sent in one system call in http.c's
add_buffer_send(), the remaining portion gets sent later by transfer.c.
That causes two problems:
1) On non-ASCII platforms the remaining portion is re-converted (into
garbage) if data->set.prefer_ascii is set.
2) On all platforms the line endings are mangled from CRLF to CRCRLF if
data->set.crlf or data->set.prefer_ascii are set (depending on the
CURL_DO_LINEEND_CONV #define).
This patch addes checks to prevent these problems.
Additional changes address two HTTP PUT problems:
1) On non-ASCII platforms not all of the protocol portions of the PUT are
being translated to ASCII.
2) On all platforms the line endings of part of the protocol portions are
being mangled from CRLF to CRCRLF if data->set.crlf or
data->set.prefer_ascii are set (depending on the CURL_DO_LINEEND_CONV
#define).
Thank you,
David McCreedy
- application/octet-stream attachment: patch.transfer.20090430.diff