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;
hyper_io_set_write(io, Curl_hyper_send);
conn->sockfd = tunnelsocket;
+ data->state.hconnect = TRUE;
+
/* create an executor to poll futures */
if(!h->exec) {
h->exec = hyper_executor_new();
trailers_state trailers_state; /* whether we are sending trailers
and what stage are we at */
#ifdef USE_HYPER
+ bool hconnect; /* set if a CONNECT request */
CURLcode hresult; /* used to pass return codes back from hyper callbacks */
#endif
<testcase>
<info>
<keywords>
+HTTP
HSTS
url_effective
</keywords>
<reply>
# we use this as response to a CONNECT
-<data nocheck="yes">
-HTTP/1.1 403 not OK at all
-Date: Tue, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 6
-Connection: close
-Funny-head: yesyes
-
+<connect nocheck="yes">
+HTTP/1.1 403 not OK at all\r
+Date: Tue, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fake\r
+Content-Length: 6\r
+Connection: close\r
+Funny-head: yesyes\r
+\r
-foo-
-</data>
+</connect>
</reply>
<client>
\r
</protocol>
<stdout>
+HTTP/1.1 403 not OK at all\r
+Date: Tue, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fake\r
+Content-Length: 6\r
+Connection: close\r
+Funny-head: yesyes\r
+\r
https://this.hsts.example/%TESTNUMBER
</stdout>
# Proxy CONNECT aborted