Lines Matching refs:http
29 #include "http.h"
86 * allows for HTTP/2 specific init of state.
95 * allows for HTTP/2 specific user-set fields.
118 /* in a HTTP/2 connection we can basically always get a frame so we should
122 /* we're still uploading or the HTTP/2 layer wants to send data */
141 static void http2_stream_free(struct HTTP *http)
143 if(http) {
144 Curl_add_buffer_free(&http->header_recvbuf);
145 Curl_add_buffer_free(&http->trailer_recvbuf);
146 for(; http->push_headers_used > 0; --http->push_headers_used) {
147 free(http->push_headers[http->push_headers_used - 1]);
149 free(http->push_headers);
150 http->push_headers = NULL;
155 * Disconnects *a* connection used for HTTP/2. It might be an old one from the
165 H2BUGF(infof(conn->data, "HTTP/2 DISCONNECT starts now\n"));
170 H2BUGF(infof(conn->data, "HTTP/2 DISCONNECT done\n"));
177 * we cannot assume that an HTTP/2 socket is dead just because it is readable.
248 /* Perform an HTTP/2 PING */
277 struct HTTP *http = data->req.protop;
279 http->nread_header_recvbuf = 0;
280 http->bodystarted = FALSE;
281 http->status_code = -1;
282 http->pausedata = NULL;
283 http->pauselen = 0;
284 http->closed = FALSE;
285 http->close_handled = FALSE;
286 http->mem = data->state.buffer;
287 http->len = data->set.buffer_size;
288 http->memlen = 0;
302 * HTTP to HTTP2.
305 "HTTP", /* scheme */
356 /* HTTP/2 error code to name based on the Error Code Registry.
442 struct HTTP *stream = h->data->req.protop;
464 struct HTTP *stream = h->data->req.protop;
506 struct HTTP *http = calloc(1, sizeof(struct HTTP));
507 if(!http) {
512 second->req.protop = http;
513 http->header_recvbuf = Curl_add_buffer_init();
514 if(!http->header_recvbuf) {
515 free(http);
537 struct HTTP *stream;
538 struct HTTP *newstream;
639 struct HTTP *stream = NULL;
770 struct HTTP *stream;
835 struct HTTP *stream;
865 infof(data_s, "http/2: failed to clear user_data for stream %d!\n",
882 struct HTTP *stream;
911 /* Decode HTTP status code. Returns -1 if no valid status code was
945 struct HTTP *stream;
1055 result = Curl_add_buffer(&stream->header_recvbuf, "HTTP/2 ", 7);
1069 H2BUGF(infof(data_s, "h2 status: HTTP/2 %03d (easy %p)\n",
1107 struct HTTP *stream = NULL;
1183 struct HTTP *http = data->req.protop;
1188 if(http->header_recvbuf) {
1189 Curl_add_buffer_free(&http->header_recvbuf);
1190 Curl_add_buffer_free(&http->trailer_recvbuf);
1191 if(http->push_headers) {
1193 for(; http->push_headers_used > 0; --http->push_headers_used) {
1194 free(http->push_headers[http->push_headers_used - 1]);
1196 free(http->push_headers);
1197 http->push_headers = NULL;
1201 if(!httpc->h2) /* not HTTP/2 ? */
1210 http->stream_id, NGHTTP2_STREAM_CLOSED))
1213 if(http->stream_id == httpc->pause_stream_id) {
1219 if(http->stream_id > 0) {
1221 http->stream_id, 0);
1223 infof(data, "http/2: failed to clear user_data for stream %d!\n",
1224 http->stream_id);
1227 http->stream_id = 0;
1332 * Returns nonzero if current HTTP/2 session should be closed.
1413 /* make sure this is only attempted for HTTP/2 transfers */
1415 struct HTTP *stream = conn->data->req.protop;
1436 struct HTTP *stream, CURLcode *err)
1467 failf(data, "HTTP/2 stream %d was not closed cleanly: %s (err %u)",
1475 failf(data, "HTTP/2 stream %d was closed cleanly, but before getting "
1516 struct HTTP *depstream = (data->set.stream_depends_on?
1534 struct HTTP *stream = data->req.protop;
1563 HTTP *stream = data->req.protop;
1762 /* If stream is closed, return 0 to signal the http routine to close
1856 struct HTTP *stream = conn->data->req.protop;
1918 /* Here, we assume the curl http code generate *correct* HTTP header
1956 failf(conn->data, "Failed sending HTTP request: Header overflow");
1978 failf(conn->data, "Failed sending HTTP request: Header overflow");
1987 nva[2].value = (unsigned char *)"http";
1991 failf(conn->data, "Failed sending HTTP request: Header overflow");
2035 /* skip header fields prohibited by HTTP/2 specification. */
2049 failf(conn->data, "Failed sending HTTP request: Header overflow");
2159 struct HTTP *stream = conn->data->req.protop;
2199 infof(conn->data, "Connection state changed (HTTP/2 confirmed)\n");
2213 struct HTTP *stream = conn->data->req.protop;
2240 infof(data, "http/2: failed to set user_data for stream %d!\n",
2276 "HTTP Upgrade response header: buflen=%zu, datalen=%zu",
2281 infof(conn->data, "Copying HTTP/2 data in stream buffer to connection buffer"
2408 /* Only call this function for a transfer that already got a HTTP/2