if(0 == k->bodywrites++) {
bool done = FALSE;
+#if defined(USE_NTLM)
+ struct connectdata *conn = data->conn;
+ if(conn->bits.close &&
+ (((data->req.httpcode == 401) &&
+ (conn->http_ntlm_state == NTLMSTATE_TYPE2)) ||
+ ((data->req.httpcode == 407) &&
+ (conn->proxy_ntlm_state == NTLMSTATE_TYPE2)))) {
+ infof(data, "Connection closed while negotiating NTLM\n");
+ data->state.authproblem = TRUE;
+ Curl_safefree(data->req.newurl);
+ }
+#endif
result = Curl_http_firstwrite(data, data->conn, &done);
if(result || done) {
infof(data, "Return early from hyper_body_chunk\n");
}
#ifdef USE_HYPER
- if(conn->datastream)
- return conn->datastream(data, conn, &didwhat, done, select_res);
+ if(conn->datastream) {
+ result = conn->datastream(data, conn, &didwhat, done, select_res);
+ if(result || *done)
+ return result;
+ }
+ else {
#endif
/* We go ahead and do a read if we have a readable socket or if
the stream was rewound (in which case we have data in a
if(result)
return result;
}
+#ifdef USE_HYPER
+ }
+#endif
k->now = Curl_now();
if(!didwhat) {