summaryrefslogtreecommitdiff
path: root/lib/c-hyper.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/c-hyper.c')
-rw-r--r--lib/c-hyper.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/c-hyper.c b/lib/c-hyper.c
index c7102979e..e3fd26c1a 100644
--- a/lib/c-hyper.c
+++ b/lib/c-hyper.c
@@ -186,7 +186,13 @@ static int hyper_body_chunk(void *userdata, const hyper_buf *chunk)
Curl_safefree(data->req.newurl);
}
#endif
- result = Curl_http_firstwrite(data, data->conn, &done);
+ if(data->state.hconnect &&
+ (data->req.httpcode/100 != 2)) {
+ done = TRUE;
+ result = CURLE_OK;
+ }
+ else
+ result = Curl_http_firstwrite(data, data->conn, &done);
if(result || done) {
infof(data, "Return early from hyper_body_chunk\n");
data->state.hresult = result;