aboutsummaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2008-09-05 17:58:53 +0000
committerDan Fandrich <dan@coneharvesters.com>2008-09-05 17:58:53 +0000
commit91ff93803512e3438ce165b23bb5b9fb404df288 (patch)
tree0fbc0009c6237d62fa4a4033ad69038a639522c3 /lib/urldata.h
parent3acd1146f992a2b8c5da22a425c1380673c5bdef (diff)
Improved the logic the decides whether to use HTTP 1.1 features or not in a
request. Detect cases where an upload must be sent chunked and the server supports only HTTP 1.0 and return CURLE_UPLOAD_FAILED.
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index a8a7555aa..ee0df8c12 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -694,7 +694,7 @@ enum expect100 {
/*
* Request specific data in the easy handle (SessionHandle). Previously,
* these members were on the connectdata struct but since a conn struct may
- * now be shared between different SessionHandles, we store connection-specifc
+ * now be shared between different SessionHandles, we store connection-specific
* data here. This struct only keeps stuff that's interesting for *this*
* request, as it will be cleared between multiple ones
*/
@@ -738,7 +738,6 @@ struct SingleRequest {
curl_off_t offset; /* possible resume offset read from the
Content-Range: header */
int httpcode; /* error code from the 'HTTP/1.? XXX' line */
- int httpversion; /* the HTTP version*10 */
struct timeval start100; /* time stamp to wait for the 100 code from */
enum expect100 exp100; /* expect 100 continue state */
@@ -929,6 +928,8 @@ struct connectdata {
char *proxypasswd; /* proxy password string, allocated */
curl_proxytype proxytype; /* what kind of proxy that is in use */
+ int httpversion; /* the HTTP version*10 reported by the server */
+
struct timeval now; /* "current" time */
struct timeval created; /* creation time */
curl_socket_t sock[2]; /* two sockets, the second is used for the data
@@ -1218,6 +1219,8 @@ struct UrlState {
/* set after initial USER failure, to prevent an authentication loop */
bool ftp_trying_alternative;
+ int httpversion; /* the lowest HTTP version*10 reported by any server
+ involved in this request */
bool expect100header; /* TRUE if we added Expect: 100-continue */
bool pipe_broke; /* TRUE if the connection we were pipelined on broke
@@ -1519,7 +1522,7 @@ struct SessionHandle {
struct Names dns;
struct Curl_multi *multi; /* if non-NULL, points to the multi handle
struct to which this "belongs" */
- struct Curl_one_easy *multi_pos; /* if non-NULL, points to the its position
+ struct Curl_one_easy *multi_pos; /* if non-NULL, points to its position
in multi controlling structure to assist
in removal. */
struct Curl_share *share; /* Share, handles global variable mutexing */