summaryrefslogtreecommitdiff
path: root/include/http_protocol.h
Commit message (Collapse)AuthorAgeFilesLines
* handle large writes in ap_rputsEric Covener2022-06-011-1/+21
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901500 13f79535-47bb-0310-9956-ffa450edef68
* Merge PR 311:Stefan Eissing2022-04-131-5/+19
| | | | | | | | | | | | | | | | *) core/mod_http: use REQUEST meta buckets and a new HTTP/1.x specific input filter to separate the handling for HTTP requests from the handling of HTTP/1.x request parsing and checks. A new HTTP1_REQUEST_IN filter installs itself on http/1.1 connections before a request is being read. It generates either a REQUEST meta bucket on success or an ERROR bucket with the proposed response status. The core connection processing, relying on ap_read_request(), now expects a REQUEST or ERROR bucket from the input filters and is agnostic to specific HTTP versions and how they bring requests into the server. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899799 13f79535-47bb-0310-9956-ffa450edef68
* * Fix typoRuediger Pluem2022-04-041-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899558 13f79535-47bb-0310-9956-ffa450edef68
* *) core: add ap_h1_append_header() for single header values.Stefan Eissing2022-04-041-0/+10
| | | | | | | | | *) mod_proxy: use of new ap_h1_header(s) functions for formatting HTTP/1.1 requests. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899550 13f79535-47bb-0310-9956-ffa450edef68
* *) core/mod_http/mod_http2:Stefan Eissing2022-04-041-0/+292
| | | | | | | | | | | | | | | | | | | - adds new meta bucket types REQUEST, RESPONSE and HEADERS to the API. - adds a new method for setting standard response headers Date and Server - adds helper methods for formatting parts of HTTP/1.x, like headers and end chunks for use in non-core parts of the server, e.g. mod_proxy - splits the HTTP_IN filter into a "generic HTTP" and "specific HTTP/1.x" filter. The latter one named HTTP1_BODY_IN. - Uses HTTP1_BODY_IN only for requests with HTTP version <= 1.1 - Removes the chunked input simulation from mod_http2 - adds body_indeterminate flag to request_rec that indicates that a request body may be present and needs to be read/discarded. This replaces logic that thinks without Content-Length and Transfer-Encoding, no request body can exist. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899547 13f79535-47bb-0310-9956-ffa450edef68
* http: Enforce that fully qualified uri-paths not to be forward-proxiedYann Ylavic2021-12-131-0/+7
| | | | | | | | | | | | have an http(s) scheme, and that the ones to be forward proxied have a hostname, per HTTP specifications. The early checks avoid failing the request later on and thus save cycles for those invalid cases. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895921 13f79535-47bb-0310-9956-ffa450edef68
* Revert spurious commit r1895340.Yann Ylavic2021-11-251-7/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895341 13f79535-47bb-0310-9956-ffa450edef68
* Trigger ci.Yann Ylavic2021-11-251-0/+7
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895340 13f79535-47bb-0310-9956-ffa450edef68
* *) core: provide ap_ssl_* functions in new http_ssl.h header file.Stefan Eissing2021-03-261-156/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1888083 13f79535-47bb-0310-9956-ffa450edef68
* Changed ap_ssl_answer_challenge() and its hook to provide PEM data forStefan Eissing2021-03-031-8/+19
| | | | | | | | | | | certificate and key instead of file names. Added support for this in mod_ssl and verified with a local mod_md version that uses it. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1887151 13f79535-47bb-0310-9956-ffa450edef68
* Adding more ap_ssl_* functions and hooks to the core server.Stefan Eissing2021-03-021-0/+85
| | | | | | | | | | | | | | | | | | - ap_ssl_add_cert_files() to enable other modules like mod_md to provide certificate and keys for an SSL module like mod_ssl. - ap_ssl_add_fallback_cert_files() to enable other modules like mod_md to provide a fallback certificate in case no 'proper' certificate is available for an SSL module like mod_ssl. - ap_ssl_answer_challenge() to enable other modules like mod_md to provide a certificate as used in the RFC 8555 'tls-alpn-01' challenge for the ACME protocol for an SSL module like mod_ssl. - Hooks for 'ssl_add_cert_files', 'ssl_add_fallback_cert_files' and 'ssl_answer_challenge' where modules like mod_md can provide providers to the above mentioned functions. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1887085 13f79535-47bb-0310-9956-ffa450edef68
* *) core: Adding SSL related inquiry functions to the server API.Stefan Eissing2021-02-231-0/+60
| | | | | | | | | | | | | | | | | | | | | | | These function are always available, even when no module providing SSL is loaded. They provide their own "shadowing" implementation for the optional functions of similar name that mod_ssl and impersonators of mod_ssl provide. This enables loading of several SSL providing modules when all but one of them registers itself into the new hooks. Two old-style SSL modules will not work, as they replace the others optional functions with their own. Modules using the old-style optional functions will continue to work as core supplies its own versions of those. The following has been added so far: - ap_ssl_conn_is_ssl() to query if a connection is using SSL. - ap_ssl_var_lookup() to query SSL related variables for a server/connection/request. - Hooks for 'ssl_conn_is_ssl' and 'ssl_var_lookup' where modules providing SSL can install their own value supplying functions. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1886840 13f79535-47bb-0310-9956-ffa450edef68
* "[mod_dav_fs etag handling] should really honor the FileETag setting".Graham Leggett2020-06-271-1/+38
| | | | | | | | | | | | | | | | - It now does. - Add "Digest" to FileETag directive, allowing a strong ETag to be generated using a file digest. - Add ap_make_etag_ex() and ap_set_etag_fd() to allow full control over ETag generation. - Add concept of "binary notes" to request_rec, allowing packed bit flags to be added to a request. - First binary note - AP_REQUEST_STRONG_ETAG - allows modules to force the ETag to a strong ETag to comply with RFC requirements, such as those mandated by various WebDAV extensions. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879285 13f79535-47bb-0310-9956-ffa450edef68
* core, h2: common ap_parse_request_line() and ap_check_request_header() code.Yann Ylavic2020-04-171-0/+14
| | | | | | | | | Extract parsing/validation code from read_request_line() and ap_read_request() into ap_parse_request_line() and ap_check_request_header() helpers such that mod_http2 can validate its HTTP/1 request with the same/configured policy. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876674 13f79535-47bb-0310-9956-ffa450edef68
* Fix spelling errors found by codespell. [skip ci]Mike Rumph2020-02-131-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1873985 13f79535-47bb-0310-9956-ffa450edef68
* Revert r1869222, wrong files committed.Yann Ylavic2019-10-311-24/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1869223 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy_http: follow up to r1869216.Yann Ylavic2019-10-311-0/+24
| | | | | | | | | | | Let's call stream_reqbody() for all rb_methods, no RB_SPOOL_CL special case. This both simplifies code and allows to keep EOS into the input_brigade until it's sent, and thus detect whether we already fetched the whole body if/when proxy_http_handler() re-enters for different balancer members. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1869222 13f79535-47bb-0310-9956-ffa450edef68
* Axe ap_rgetline_core(), not used anymore.Yann Ylavic2018-04-221-20/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1829790 13f79535-47bb-0310-9956-ffa450edef68
* http: add ap_fgetline() and AP_GETLINE_NONBLOCK flag.Yann Ylavic2018-04-201-29/+39
| | | | | | | | | | | | | | | | It allows to read a line directly from an input filter, in blocking mode or not. Since no request_rec is needed, a pool may be given. Existing ap_[r]getline() function are now based off ap_fgetline() by calling: ap_fgetline(s, n, read, r->proto_input_filters, flags, bb, r->pool); Will follow up with a new ap_get_mime_headers_*() flavor which can be used by any filter that needs non-blocking and not necessarily has a request_rec (e.g. ap_http_filter() to read proxied response trailers). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1829659 13f79535-47bb-0310-9956-ffa450edef68
* core: Add and handle AP_GETLINE_NOSPC_EOL flag in ap_rgetline_core().Yann Ylavic2018-04-191-1/+3
| | | | | | | | | | | This tells the ap_getline() family of functions to consume the end of line when the buffer is exhausted. PR 62198. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1829557 13f79535-47bb-0310-9956-ffa450edef68
* Fix some doxygen commentChristophe Jaillet2018-03-221-4/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1827529 13f79535-47bb-0310-9956-ffa450edef68
* CVE-2017-3167: add documentation to ap_get_basic_auth_pw()Jacob Champion2017-06-201-2/+9
| | | | | | | Now that we've released, add clarifying comments to the now-deprecated API. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1799374 13f79535-47bb-0310-9956-ffa450edef68
* core: deprecate and replace ap_get_basic_auth_pwEric Covener2017-05-261-1/+24
| | | | | | | | | | | *) core: Deprecate ap_get_basic_auth_pw() and add ap_get_basic_auth_components(). Submitted By: Emmanuel Dreyfus <manu netbsd.org>, Jacob Champion, Eric Covener CVEID: CVE-2017-3167 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1796348 13f79535-47bb-0310-9956-ffa450edef68
* http: Allow unknown response status' lines returned in the form of:Yann Ylavic2016-11-151-0/+11
| | | | | | | | HTTP/x.x xxx Status xxx git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1769760 13f79535-47bb-0310-9956-ffa450edef68
* New optional flag to enforce <CR><LF> line delimiters in ap_[r]getline,William A. Rowe Jr2016-08-291-5/+12
| | | | | | | | | | | | | | created by overloading 'int fold' (1 or 0) as 'int flags', with the same value 1 for AP_GETLINE_FOLD (which httpd doesn't use), and a new value 2 for AP_GETLINE_CRLF Enforce CRLF when HttpProtocolOptions Strict is in force. Correctly introduces a new t/TEST fail. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1758304 13f79535-47bb-0310-9956-ffa450edef68
* Fix a small doxygen issueChristophe Jaillet2016-03-121-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1734716 13f79535-47bb-0310-9956-ffa450edef68
* added AP_DECLARE for new ap_create_requestStefan Eissing2016-03-091-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1734231 13f79535-47bb-0310-9956-ffa450edef68
* core: Split ap_create_request() from ap_read_request()Graham Leggett2016-03-071-0/+7
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1734009 13f79535-47bb-0310-9956-ffa450edef68
* * include/http_protocol.h: Tweak wording.Joe Orton2016-02-261-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1732521 13f79535-47bb-0310-9956-ffa450edef68
* first request on master connection only reports more preferred protocols in ↵Stefan Eissing2015-10-261-1/+6
| | | | | | Upgrade header git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1710583 13f79535-47bb-0310-9956-ffa450edef68
* announce protocol choices on first requestStefan Eissing2015-10-231-1/+16
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1710231 13f79535-47bb-0310-9956-ffa450edef68
* new ap_is_allowed_protocol() for testing configured protocols, added ↵Stefan Eissing2015-10-201-0/+17
| | | | | | H2Upgrade on/off directive, changed H2Direct default back to on when h2c is in Protocols git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1709587 13f79535-47bb-0310-9956-ffa450edef68
* improvements in ap_select_protocol(), supplied by yann ylavicStefan Eissing2015-09-041-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1701178 13f79535-47bb-0310-9956-ffa450edef68
* changed Protocols default to http/1.1 only, updated documentation, changed ↵Stefan Eissing2015-09-031-2/+6
| | | | | | ap_select_protocol() to return NULL when no protocol could be agreed upon git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1701005 13f79535-47bb-0310-9956-ffa450edef68
* Allowing protocol_propose hooks to be called with offers=NULL, clarifying ↵Stefan Eissing2015-08-271-9/+19
| | | | | | semantics as proposed by chaosed0@gmail.com git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1698116 13f79535-47bb-0310-9956-ffa450edef68
* adding ap_get_protocol(c) which safeguards against NULL returns, for use ↵Stefan Eissing2015-08-261-6/+22
| | | | | | instead of direct calling ap_run_protocol_get git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1697855 13f79535-47bb-0310-9956-ffa450edef68
* new Protocols directive and core API changes to enable protocol switching on ↵Stefan Eissing2015-07-241-0/+103
| | | | | | HTTP Upgrade or ALPN, implemented in mod_ssl and mod_h2 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1692486 13f79535-47bb-0310-9956-ffa450edef68
* Correct typo in comments for ap_map_http_request_error().Chris Darroch2013-10-071-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1529988 13f79535-47bb-0310-9956-ffa450edef68
* ap_rputs() silently truncated size_t to int, resulting in 130+ warningsJeff Trawick2013-10-051-1/+1
| | | | | | | when building httpd and a rich set of modules on Windows. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1529449 13f79535-47bb-0310-9956-ffa450edef68
* core: Stop the HTTP_IN filter from attempting to write error bucketsGraham Leggett2013-05-141-0/+17
| | | | | | | | | to the output filters, which is bogus in the proxy case. Create a clean mapping from APR codes to HTTP status codes, and use it where needed. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1482522 13f79535-47bb-0310-9956-ffa450edef68
* core, mod_cache: Ensure RFC2616 compliance in ap_meets_conditions()Graham Leggett2013-05-071-0/+66
| | | | | | | | | | with weak validation combined with If-Range and Range headers. Break out explicit conditional header checks to be useable elsewhere in the server. Ensure weak validation RFC compliance in the byteranges filter. Ensure RFC validation compliance when serving cached entities. PR 16142 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1479905 13f79535-47bb-0310-9956-ffa450edef68
* fix comment typoStefan Fritsch2012-11-091-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1407526 13f79535-47bb-0310-9956-ffa450edef68
* Typo fixDaniel Gruno2012-08-021-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1368396 13f79535-47bb-0310-9956-ffa450edef68
* bad header info: ap_rflush does not return the number of bytes flushed, it ↵Daniel Gruno2012-08-021-1/+1
| | | | | | returns 0 on success, -1 on error. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1368393 13f79535-47bb-0310-9956-ffa450edef68
* Rename ap_func_attr_* macros to AP_FN_ATTR_*Stefan Fritsch2012-01-091-1/+1
| | | | | | | Add macro for attribute alloc_size on newer gcc's git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1229134 13f79535-47bb-0310-9956-ffa450edef68
* Clean up size_t abuse, part 2. ap_malloc/calloc/realloc are explicitlyWilliam A. Rowe Jr2012-01-061-2/+4
| | | | | | | | | excluded from this cleanup as they must be signature identical to the clib functions, and although the definition of size_t has been flakey, the definition of those functions appears to be generally clean since ANSI C. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1228323 13f79535-47bb-0310-9956-ffa450edef68
* More cleanup: Expand tabs and some more indentation fixesStefan Fritsch2011-09-231-4/+4
| | | | | | | No functional change git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174929 13f79535-47bb-0310-9956-ffa450edef68
* Cleanup effort in prep for GA push:Jim Jagielski2011-09-231-37/+37
| | | | | | | | Trim trailing whitespace... no func change git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174748 13f79535-47bb-0310-9956-ffa450edef68
* typo in commentEric Covener2011-09-081-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1166672 13f79535-47bb-0310-9956-ffa450edef68
* refactor to pull setting of Accept-Ranges header into http_protocol.c whichEric Covener2011-09-081-0/+7
| | | | | | | | had been copied to other handlers. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1166663 13f79535-47bb-0310-9956-ffa450edef68