summaryrefslogtreecommitdiffstats
path: root/server/protocol.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Introduce ap_scan_http_token / ap_scan_http_field_content for a muchWilliam A. Rowe Jr2016-07-291-51/+86
| | | | | | | | | | | | | | | | more efficient pass through the header text; rather than reparsing the strings over and over under the HTTP_CONFORMANCE_STRICT fules. Improve logic and legibility by eliminating multiple repetitive tests of the STRICT flag, and simply reorder 'classic' behavior first and this new parser second to simplify the diff. Because of the whitespace change (which I had wished to dodge), reading this --ignore-all-space is a whole lot easier. Particularly against 2.4.x branch, which is now identical in the 'classic' logic flow. Both of which I'll share with dev@ git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754556 13f79535-47bb-0310-9956-ffa450edef68
* Strictly observe spec on obs-foldWilliam A. Rowe Jr2016-07-291-0/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754548 13f79535-47bb-0310-9956-ffa450edef68
* We arrive here for more than one cause; offer a more general statementWilliam A. Rowe Jr2016-07-291-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754547 13f79535-47bb-0310-9956-ffa450edef68
* core: removing quirk for supressing h2 in Upgrade: response header, never ↵Stefan Eissing2016-06-151-6/+1
| | | | | | backported, obsolete git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1748591 13f79535-47bb-0310-9956-ffa450edef68
* Rename ap_casecmpstr[n]() to ap_cstr_casecmp[n](), update with APR doxygenWilliam A. Rowe Jr2016-06-091-6/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1747469 13f79535-47bb-0310-9956-ffa450edef68
* Delay a table lookup until we know that we can handle the request.Christophe Jaillet2016-06-051-9/+13
| | | | | | | Concat a string at compile time, rather than run time. Some various style fixes. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1746884 13f79535-47bb-0310-9956-ffa450edef68
* Followup to r1742791: Probably the better fixRainer Jung2016-05-081-1/+1
| | | | | | | | is not fiddling with connection changes but instead use a NULL request like in similar places. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1742792 13f79535-47bb-0310-9956-ffa450edef68
* Don't globber scoreboard request info ifRainer Jung2016-05-081-1/+1
| | | | | | | | | | | | read_request_line() fails with a timeout. In that case there's no new useful request info available. Noticed via server-status showing request "NULL" after keep-alive connections timed out. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1742791 13f79535-47bb-0310-9956-ffa450edef68
* fixing h2 supress to inhibit other annnouncements in upgrade: headerStefan Eissing2016-04-201-1/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1740119 13f79535-47bb-0310-9956-ffa450edef68
* suppress h2 in upgrade headerStefan Eissing2016-04-201-1/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1740075 13f79535-47bb-0310-9956-ffa450edef68
* declaring ap_create_request for external linkageStefan Eissing2016-03-091-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1734281 13f79535-47bb-0310-9956-ffa450edef68
* core: Split ap_create_request() from ap_read_request()Graham Leggett2016-03-081-7/+16
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1734009 13f79535-47bb-0310-9956-ffa450edef68
* Remove now useless apr_pstrdup.Christophe Jaillet2016-02-051-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1728748 13f79535-47bb-0310-9956-ffa450edef68
* * Ensure that proto_num and protocol is set in another "error out early" edgeRuediger Pluem2016-01-291-0/+2
| | | | | | | | | case. This can happen with invalid CONNECT requests as described in the PR. PR: 58929 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1727544 13f79535-47bb-0310-9956-ffa450edef68
* Added many log numbers to log statements thatRainer Jung2016-01-191-3/+4
| | | | | | | | | | | | | | had none. Handled all files server/*.c. Excluded startup error messages in server/config.c and server/main.c. I used the coccinelle script provided by Stefan. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725395 13f79535-47bb-0310-9956-ffa450edef68
* Use new ap_casecmpstr[n]() functions where appropriate (not exhaustive).Yann Ylavic2015-11-231-6/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715876 13f79535-47bb-0310-9956-ffa450edef68
* Revert r1715789: will re-commit without spurious functional changes.Yann Ylavic2015-11-231-6/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715869 13f79535-47bb-0310-9956-ffa450edef68
* Use new ap_casecmpstr[n]() functions where appropriate (not exhaustive).Yann Ylavic2015-11-231-6/+6
| | | | | | | [Reverted by r1715869] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715789 13f79535-47bb-0310-9956-ffa450edef68
* first request on master connection only reports more preferred protocols in ↵Stefan Eissing2015-10-261-1/+4
| | | | | | Upgrade header git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1710583 13f79535-47bb-0310-9956-ffa450edef68
* fixing compilation issue for older platformStefan Eissing2015-10-251-1/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1710419 13f79535-47bb-0310-9956-ffa450edef68
* announce protocol choices on first requestStefan Eissing2015-10-231-0/+36
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1710231 13f79535-47bb-0310-9956-ffa450edef68
* core: Limit to ten the number of tolerated empty lines between request,Yann Ylavic2015-10-221-7/+12
| | | | | | | | | | | | | | | | | | | | | | | and consume them before the pipelining check to avoid possible response delay when reading the next request without flushing. Before this commit, the maximum number of empty lines was the same as configured LimitRequestFields, defaulting to 100, which was way too much. We now use a fixed/hard limit of 10 (DEFAULT_LIMIT_BLANK_LINES). check_pipeline() is changed to check for (up to the limit) and comsume the trailing [CR]LFs so that they won't be interpreted as pipelined requests, otherwise we would block on the next read without flushing data, and hence possibly delay pending response(s) until the next/real request comes in or the keepalive timeout expires. Finally, when the maximum number of empty line is reached in read_request_line(), or that request line does not contains at least a method and an (valid) URI, we can fail early and avoid some failure detected in further processing. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1710095 13f79535-47bb-0310-9956-ffa450edef68
* new ap_is_allowed_protocol() for testing configured protocols, added ↵Stefan Eissing2015-10-201-1/+22
| | | | | | 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-46/+41
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1701178 13f79535-47bb-0310-9956-ffa450edef68
* s/;;/;/Gregg Lewis Smith2015-09-041-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1701165 13f79535-47bb-0310-9956-ffa450edef68
* changed Protocols default to http/1.1 only, updated documentation, changed ↵Stefan Eissing2015-09-031-23/+47
| | | | | | 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
* final final change to the new ap_array_str_* functions after reviewStefan Eissing2015-09-031-5/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1700968 13f79535-47bb-0310-9956-ffa450edef68
* giving ap_array_index a start parameter, adding ap_array_containsStefan Eissing2015-08-271-5/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1698133 13f79535-47bb-0310-9956-ffa450edef68
* adding ap_get_protocol(c) which safeguards against NULL returns, for use ↵Stefan Eissing2015-08-261-2/+8
| | | | | | 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
* introducing ap_array_index in util, used in protocol and mod_h2Stefan Eissing2015-08-171-18/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1696264 13f79535-47bb-0310-9956-ffa450edef68
* fixes existing protocol missing in selection if not explicitly proposedStefan Eissing2015-08-141-4/+14
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1695874 13f79535-47bb-0310-9956-ffa450edef68
* new directive ProtocolsHonorOrder, added documentation for Protocols ↵Stefan Eissing2015-08-131-1/+4
| | | | | | feature, changed preference selection and config merging git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1695727 13f79535-47bb-0310-9956-ffa450edef68
* new Protocols directive and core API changes to enable protocol switching on ↵Stefan Eissing2015-07-241-0/+133
| | | | | | 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
* be less weird in commentEric Covener2015-06-251-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1687643 13f79535-47bb-0310-9956-ffa450edef68
* elaborate on a misleading commentEric Covener2015-06-251-1/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1687642 13f79535-47bb-0310-9956-ffa450edef68
* core: Avoid a possible truncation of the faulty header included in theYann Ylavic2015-06-021-3/+6
| | | | | | | HTML response when LimitRequestFieldSize is reached. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1683123 13f79535-47bb-0310-9956-ffa450edef68
* http: Don't remove the Content-Length of zero from a HEAD response if Yann Ylavic2015-05-071-5/+34
| | | | | | | | | | it comes from an origin server, module or script. Instead of removing the C-L in ap_http_header_filter() after it has been set by ap_content_length_filter(), just don't set it in the latter. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1678215 13f79535-47bb-0310-9956-ffa450edef68
* core: Follow up to r1664205.Yann Ylavic2015-03-061-0/+3
| | | | | | | | | Don't let invalid r->proto_num/protocol out of read_request_line() reach the output filters (when responding with 400 Bad Request). Suggested by: rpluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1664576 13f79535-47bb-0310-9956-ffa450edef68
* *) SECURITY: CVE-2015-0253 (cve.mitre.org)Eric Covener2015-03-051-2/+2
| | | | | | | | | | | | | | | | core: Fix a crash introduced in with ErrorDocument 400 pointing to a local URL-path with the INCLUDES filter active, introduced in 2.4.11. PR 57531. [Yann Ylavic] Submitted By: ylavic Committed By: covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1664205 13f79535-47bb-0310-9956-ffa450edef68
* Support custom ErrorDocuments for HTTP 501 and 414 status codes.Eric Covener2014-10-311-1/+4
| | | | | | | | | | PR 57167 [Edward Lu <Chaosed0 gmail.com>] Submitted By: Edward Lu <Chaosed0 gmail.com> Committed By: covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1635762 13f79535-47bb-0310-9956-ffa450edef68
* Fix sscanf format spotted by cppcheck.Christophe Jaillet2014-08-301-1/+1
| | | | | | | Improve alignment. Untested. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1621419 13f79535-47bb-0310-9956-ffa450edef68
* Add missing APLOGNO.Christophe Jaillet2014-07-201-4/+4
| | | | | | | | Refactor some lines to keep APLOGNO on the same line as ap_log_error, when applicable. Split lines longer than 80. Improve alignment. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1612068 13f79535-47bb-0310-9956-ffa450edef68
* *) SECURITY: CVE-2013-5704 (cve.mitre.org)Eric Covener2014-07-151-0/+4
| | | | | | | | | | | | | | | core: HTTP trailers could be used to replace HTTP headers late during request processing, potentially undoing or otherwise confusing modules that examined or modified request headers earlier. Adds "MergeTrailers" directive to restore legacy behavior. Submitted By: Edward Lu, Yann Ylavic, Joe Orton, Eric Covener Committed By: covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1610814 13f79535-47bb-0310-9956-ffa450edef68
* new lognoJim Jagielski2013-12-311-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1554522 13f79535-47bb-0310-9956-ffa450edef68
* Add directives to control two protocol options:Justin Erenkrantz2013-12-301-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | HttpContentLengthHeadZero - allow Content-Length of 0 to be returned on HEAD HttpExpectStrict - allow admin to control whether we must see "100-continue" This is helpful when using Ceph's radosgw and httpd. Inspired by: Yehuda Sadeh <yehuda@inktank.com> See https://github.com/ceph/apache2/commits/precise * include/http_core.h (core_server_config): Add http_cl_head_zero and http_expect_strict fields. * modules/http/http_filters.c (ap_http_header_filter): Only clear out the C-L if http_cl_head_zero is not explictly set. * server/core.c (merge_core_server_configs): Add new fields. (set_cl_head_zero, set_expect_strict): New config helpers. (HttpContentLengthHeadZero, HttpExpectStrict): Declare new directives. * server/protocol.c (ap_read_request): Allow http_expect_strict to control if we return 417. * include/ap_mmn.h (MODULE_MAGIC_NUMBER_MAJOR, MODULE_MAGIC_NUMBER_MINOR): Bump. * CHANGES: Add a brief description. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1554303 13f79535-47bb-0310-9956-ffa450edef68
* Fix missing spaces in messagesChristophe Jaillet2013-12-011-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1546860 13f79535-47bb-0310-9956-ffa450edef68
* PR 55616 (add missing APLOGNO), part 1Kaspar Brand2013-10-011-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1527925 13f79535-47bb-0310-9956-ffa450edef68
* draft-ietf-httpbis-p1-messaging-23 fixes regarding interactionsJim Jagielski2013-09-191-7/+29
| | | | | | between TE and content-length in the same req/resp. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1524770 13f79535-47bb-0310-9956-ffa450edef68
* Update rationaleJim Jagielski2013-09-171-4/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1524192 13f79535-47bb-0310-9956-ffa450edef68
* revert 1524161 for the time beingJim Jagielski2013-09-171-31/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1524190 13f79535-47bb-0310-9956-ffa450edef68