aboutsummaryrefslogtreecommitdiff
path: root/lib/http.c
diff options
context:
space:
mode:
authorMichael Kaufmann <mail@michael-kaufmann.ch>2018-12-10 17:30:31 +0100
committerDaniel Stenberg <daniel@haxx.se>2018-12-11 13:22:42 +0100
commitc8bf8cc1e4e8f6e8c29b104a2bcc47c626e18081 (patch)
tree3593b130195d80ca06ad17b9b876eb16d3c11266 /lib/http.c
parent1b443a7c00c1e5d2d0567d440f309cba5d69096b (diff)
http: don't set CURLINFO_CONDITION_UNMET for http status code 204
The http status code 204 (No Content) should not change the "condition unmet" flag. Only the http status code 304 (Not Modified) should do this. Closes #359
Diffstat (limited to 'lib/http.c')
-rw-r--r--lib/http.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/http.c b/lib/http.c
index 7be6f8b92..7d50750a4 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -3657,13 +3657,6 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data,
}
switch(k->httpcode) {
- case 204:
- /* (quote from RFC2616, section 10.2.5): The server has
- * fulfilled the request but does not need to return an
- * entity-body ... The 204 response MUST NOT include a
- * message-body, and thus is always terminated by the first
- * empty line after the header fields. */
- /* FALLTHROUGH */
case 304:
/* (quote from RFC2616, section 10.3.5): The 304 response
* MUST NOT contain a message-body, and thus is always
@@ -3671,6 +3664,13 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data,
* fields. */
if(data->set.timecondition)
data->info.timecond = TRUE;
+ /* FALLTHROUGH */
+ case 204:
+ /* (quote from RFC2616, section 10.2.5): The server has
+ * fulfilled the request but does not need to return an
+ * entity-body ... The 204 response MUST NOT include a
+ * message-body, and thus is always terminated by the first
+ * empty line after the header fields. */
k->size = 0;
k->maxdownload = 0;
k->ignorecl = TRUE; /* ignore Content-Length headers */