• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/libevent/

Lines Matching refs:headers

187 static int evhttp_add_header_internal(struct evkeyvalq *headers,
424 /* Create the headers needed for an outgoing HTTP request, adds them to
455 /** Return true if the list of headers in 'headers', intepreted with respect
459 evhttp_is_connection_close(int flags, struct evkeyvalq* headers)
463 const char *connection = evhttp_find_header(headers, "Proxy-Connection");
466 const char *connection = evhttp_find_header(headers, "Connection");
478 /* Return true iff 'headers' contains 'Connection: keep-alive' */
480 evhttp_is_connection_keepalive(struct evkeyvalq* headers)
482 const char *connection = evhttp_find_header(headers, "Connection");
487 /* Add a correct "Date" header to headers, unless it already has one. */
489 evhttp_maybe_add_date_header(struct evkeyvalq *headers)
491 if (evhttp_find_header(headers, "Date") == NULL) {
494 evhttp_add_header(headers, "Date", date);
499 /* Add a "Content-Length" header with value 'content_length' to headers,
502 evhttp_maybe_add_content_length_header(struct evkeyvalq *headers,
505 if (evhttp_find_header(headers, "Transfer-Encoding") == NULL &&
506 evhttp_find_header(headers, "Content-Length") == NULL) {
510 evhttp_add_header(headers, "Content-Length", len);
515 * Create the headers needed for an HTTP reply in req->output_headers,
553 /* Potentially add headers for unidentified content. */
590 /** Generate all headers appropriate for sending the http request in req (or
601 * add some new headers or remove existing headers.
1852 evhttp_find_header(const struct evkeyvalq *headers, const char *key)
1856 TAILQ_FOREACH(header, headers, next) {
1865 evhttp_clear_headers(struct evkeyvalq *headers)
1869 for (header = TAILQ_FIRST(headers);
1871 header = TAILQ_FIRST(headers)) {
1872 TAILQ_REMOVE(headers, header, next);
1885 evhttp_remove_header(struct evkeyvalq *headers, const char *key)
1889 TAILQ_FOREACH(header, headers, next) {
1898 TAILQ_REMOVE(headers, header, next);
1922 evhttp_add_header(struct evkeyvalq *headers,
1928 /* drop illegal headers */
1938 return (evhttp_add_header_internal(headers, key, value));
1942 evhttp_add_header_internal(struct evkeyvalq *headers,
1962 TAILQ_INSERT_TAIL(headers, header, next);
1973 * MORE_DATA_EXPECTED when we need to read more headers
1974 * ALL_DATA_READ when all headers have been read.
2020 evhttp_append_to_last_header(struct evkeyvalq *headers, char *line)
2022 struct evkeyval *header = TAILQ_LAST(headers, evkeyvalq);
2056 struct evkeyvalq* headers = req->input_headers;
2078 if (evhttp_append_to_last_header(headers, line) == -1)
2093 if (evhttp_add_header(headers, skey, svalue) == -1)
2115 struct evkeyvalq *headers = req->input_headers;
2119 content_length = evhttp_find_header(headers, "Content-Length");
2120 connection = evhttp_find_header(headers, "Connection");
2281 /* Done reading headers, do the real work */
2782 /* Requires that headers and response code are already set up */
2803 /* Adds headers to the response */
3202 evhttp_parse_query_impl(const char *str, struct evkeyvalq *headers,
3212 TAILQ_INIT(headers);
3252 evhttp_add_header_internal(headers, key, decoded_value);
3259 evhttp_clear_headers(headers);
3269 evhttp_parse_query(const char *uri, struct evkeyvalq *headers)
3271 return evhttp_parse_query_impl(uri, headers, 1);
3274 evhttp_parse_query_str(const char *uri, struct evkeyvalq *headers)
3276 return evhttp_parse_query_impl(uri, headers, 0);
4133 /** Returns the input headers */
4139 /** Returns the output headers */