Fixed a flaw in the "Expect: 100-continue" treatment. If you did two POSTs
on a persistent connection and allowed the first to use that header, you could not disable it for the second request.
This commit is contained in:
11
CHANGES
11
CHANGES
@@ -6,6 +6,17 @@
|
|||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
|
Daniel (8 August 2006)
|
||||||
|
- Fixed a flaw in the "Expect: 100-continue" treatment. If you did two POSTs
|
||||||
|
on a persistent connection and allowed the first to use that header, you
|
||||||
|
could not disable it for the second request.
|
||||||
|
|
||||||
|
Daniel (7 August 2006)
|
||||||
|
- Domenico Andreolfound a quick build error which happened because
|
||||||
|
src/config.h.in was not a proper duplcate of lib/config.h.in which it
|
||||||
|
should've been and this was due to the maketgz script not doing the cp
|
||||||
|
properly.
|
||||||
|
|
||||||
Version 7.15.5 (7 August 2006)
|
Version 7.15.5 (7 August 2006)
|
||||||
|
|
||||||
Daniel (2 August 2006)
|
Daniel (2 August 2006)
|
||||||
|
|||||||
@@ -9,28 +9,14 @@ Curl and libcurl 7.15.6
|
|||||||
Number of known libcurl bindings: 32
|
Number of known libcurl bindings: 32
|
||||||
Number of contributors: 515
|
Number of contributors: 515
|
||||||
|
|
||||||
This release includes the following changes:
|
|
||||||
|
|
||||||
o
|
|
||||||
|
|
||||||
This release includes the following bugfixes:
|
This release includes the following bugfixes:
|
||||||
|
|
||||||
o
|
o "Expect: 100-continue" disable on second POST on re-used connection
|
||||||
|
o src/config.h.in is fixed
|
||||||
Other curl-related news:
|
|
||||||
|
|
||||||
o
|
|
||||||
|
|
||||||
New curl mirrors:
|
|
||||||
|
|
||||||
o
|
|
||||||
|
|
||||||
This release would not have looked like this without help, code, reports and
|
This release would not have looked like this without help, code, reports and
|
||||||
advice from friends like these:
|
advice from friends like these:
|
||||||
|
|
||||||
Dan Fandrich, Peter Silva, Arve Knudsen, Michael Wallner, Toshiyuki Maezawa,
|
Domenico Andreoli
|
||||||
Ingmar Runge, Ates Goral, David McCreedy, Jari Sundell, Georg Horn,
|
|
||||||
Gisle Vanem, Yang Tse, Michael Jerris, Dan Nelson, Yves Lejeune,
|
|
||||||
Maciej Karpiuk, Mark Lentczner
|
|
||||||
|
|
||||||
Thanks! (and sorry if I forgot to mention someone)
|
Thanks! (and sorry if I forgot to mention someone)
|
||||||
|
|||||||
@@ -1516,6 +1516,8 @@ static CURLcode expect100(struct SessionHandle *data,
|
|||||||
send_buffer *req_buffer)
|
send_buffer *req_buffer)
|
||||||
{
|
{
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
|
data->state.expect100header = FALSE; /* default to false unless it is set
|
||||||
|
to TRUE below */
|
||||||
if((data->set.httpversion != CURL_HTTP_VERSION_1_0) &&
|
if((data->set.httpversion != CURL_HTTP_VERSION_1_0) &&
|
||||||
!checkheaders(data, "Expect:")) {
|
!checkheaders(data, "Expect:")) {
|
||||||
/* if not doing HTTP 1.0 or disabled explicitly, we add a Expect:
|
/* if not doing HTTP 1.0 or disabled explicitly, we add a Expect:
|
||||||
@@ -1525,7 +1527,7 @@ static CURLcode expect100(struct SessionHandle *data,
|
|||||||
result = add_bufferf(req_buffer,
|
result = add_bufferf(req_buffer,
|
||||||
"Expect: 100-continue\r\n");
|
"Expect: 100-continue\r\n");
|
||||||
if(result == CURLE_OK)
|
if(result == CURLE_OK)
|
||||||
data->set.expect100header = TRUE;
|
data->state.expect100header = TRUE;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1532,14 +1532,14 @@ CURLcode Curl_readwrite_init(struct connectdata *conn)
|
|||||||
Thus, we must check if the request has been sent before we set the
|
Thus, we must check if the request has been sent before we set the
|
||||||
state info where we wait for the 100-return code
|
state info where we wait for the 100-return code
|
||||||
*/
|
*/
|
||||||
if (data->set.expect100header &&
|
if (data->state.expect100header &&
|
||||||
(conn->proto.http->sending == HTTPSEND_BODY)) {
|
(conn->proto.http->sending == HTTPSEND_BODY)) {
|
||||||
/* wait with write until we either got 100-continue or a timeout */
|
/* wait with write until we either got 100-continue or a timeout */
|
||||||
k->write_after_100_header = TRUE;
|
k->write_after_100_header = TRUE;
|
||||||
k->start100 = k->start;
|
k->start100 = k->start;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(data->set.expect100header)
|
if(data->state.expect100header)
|
||||||
/* when we've sent off the rest of the headers, we must await a
|
/* when we've sent off the rest of the headers, we must await a
|
||||||
100-continue */
|
100-continue */
|
||||||
k->wait100_after_headers = TRUE;
|
k->wait100_after_headers = TRUE;
|
||||||
|
|||||||
@@ -940,6 +940,8 @@ struct UrlState {
|
|||||||
/* set after initial USER failure, to prevent an authentication loop */
|
/* set after initial USER failure, to prevent an authentication loop */
|
||||||
bool ftp_trying_alternative;
|
bool ftp_trying_alternative;
|
||||||
|
|
||||||
|
bool expect100header; /* TRUE if we added Expect: 100-continue */
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
/* do FTP line-end conversions on most platforms */
|
/* do FTP line-end conversions on most platforms */
|
||||||
#define CURL_DO_LINEEND_CONV
|
#define CURL_DO_LINEEND_CONV
|
||||||
@@ -1135,7 +1137,6 @@ struct UserDefined {
|
|||||||
bool krb4; /* kerberos4 connection requested */
|
bool krb4; /* kerberos4 connection requested */
|
||||||
bool reuse_forbid; /* forbidden to be reused, close after use */
|
bool reuse_forbid; /* forbidden to be reused, close after use */
|
||||||
bool reuse_fresh; /* do not re-use an existing connection */
|
bool reuse_fresh; /* do not re-use an existing connection */
|
||||||
bool expect100header; /* TRUE if we added Expect: 100-continue */
|
|
||||||
bool ftp_use_epsv; /* if EPSV is to be attempted or not */
|
bool ftp_use_epsv; /* if EPSV is to be attempted or not */
|
||||||
bool ftp_use_eprt; /* if EPRT is to be attempted or not */
|
bool ftp_use_eprt; /* if EPRT is to be attempted or not */
|
||||||
curl_ftpssl ftp_ssl; /* if AUTH TLS is to be attempted etc */
|
curl_ftpssl ftp_ssl; /* if AUTH TLS is to be attempted etc */
|
||||||
|
|||||||
Reference in New Issue
Block a user