summaryrefslogtreecommitdiffstats
path: root/server/core.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Perform correct, strict parsing of the request line, handling theWilliam A. Rowe Jr2016-08-181-18/+37
| | | | | | | | | | | | | | | | | | | | http protocol tag, url and method appropriately, and attempting to extract values even in the presence of unusual whitespace in keeping with section 3.5, prior to responding with whatever error reply is needed. Conforms to RFC7230 in all respects, the section 3.5 optional behavior can be disabled by the user with a new HttpProtocolOptions StrictWhitespace flag. In all cases, the_request is regenerated from the parsed components with exactly two space characters. Shift sf's 'strict' method check from the Strict behavior because it violates forward proxy logic, adding a new RegisteredMethods flag, as it will certainly be useful to some. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756729 13f79535-47bb-0310-9956-ffa450edef68
* Renaming this directive to HttpProtocolOptions after discussion on dev@William A. Rowe Jr2016-08-171-5/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756649 13f79535-47bb-0310-9956-ffa450edef68
* Rename the previously undocumented HTTPProtocol directiveWilliam A. Rowe Jr2016-08-161-26/+28
| | | | | | | | | | | | | | | | | | | | | | | | to EnforceHTTPProtocol, and invert the default behavior to strictly observe RFC 7230 unless otherwise configured. And Document This. The relaxation option is renamed 'Unsafe'. 'Strict' is no longer case sensitive. 'min=0.9|1.0' is now the verbose 'Allow0.9' or 'Require1.0' case-insenstive grammer. The exclusivity tests have been modified to detect conflicts. The 'strict,log' option failed to enforce strict conformance, and has been removed. Unsafe, informational logging is possible in any loadable module, after the request data is unsafely accepted. This triggers a group of failures in t/apache/headers.t as expected since those patterns violated RFC 7230 section 3.2.4. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756540 13f79535-47bb-0310-9956-ffa450edef68
* Add -DDUMP_INCLUDES configtest option to show the treeEric Covener2016-06-111-0/+22
| | | | | | | | | | | | | | | | | | | | | | | of Included configuration files. Example: Included configuration files: (*) .../conf/httpd.conf (517) .../conf/extra/proxy-html.conf (91) /dev/null Submitted By: Jacob Champion <champion.pxi gmail.com> Committed By: covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1747808 13f79535-47bb-0310-9956-ffa450edef68
* Rename ap_casecmpstr[n]() to ap_cstr_casecmp[n](), update with APR doxygenWilliam A. Rowe Jr2016-06-091-92/+92
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1747469 13f79535-47bb-0310-9956-ffa450edef68
* Remove out-dated commentChristophe Jaillet2016-05-201-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1744655 13f79535-47bb-0310-9956-ffa450edef68
* We need another guard, this may resolve a crash in the rather odd faux-serverWilliam A. Rowe Jr2016-05-031-1/+4
| | | | | | | | implementation in mod_perl test suite which calls access checking too early. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1742135 13f79535-47bb-0310-9956-ffa450edef68
* Ensure http2 follows http in the meaning ofWilliam A. Rowe Jr2016-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | status WRITE (meaning 'in the request processing phase' even if still consuming the request body, not literally in a 'now writing' state). Ensure a number of MPMs and the h2 connection io no longer clobber the request status line during state-only changes. While at it, clean up some very ugly formatting and unnecessary decoration, and avoid the wordy _from_conn() flavor when we are not passing a connection_rec. Ensure the useragent_ip is only used in the case where it has been initialized, fall back on the connection's remote_ip if the status is accidently updated from an uninitialized request_rec. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1741310 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy, mod_ssl: Handle SSLProxy* directives in <Proxy> sections,Yann Ylavic2016-04-261-1/+4
| | | | | | | | allowing per backend TLS configuration. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1740928 13f79535-47bb-0310-9956-ffa450edef68
* core: '!x == 0' => 'x != 0' to avoid a compiler warning (suggesting parens).Yann Ylavic2016-03-301-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1737103 13f79535-47bb-0310-9956-ffa450edef68
* fix order of lowercase/compare for r->handlerEric Covener2016-03-191-9/+9
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1735786 13f79535-47bb-0310-9956-ffa450edef68
* Add CGIVar directive for configuring REQUEST_URI behaviorJeff Trawick2016-03-141-0/+36
| | | | | | | | The goal is to use this one directive to handle any configurable CGI variable behavior; only one CGI variable is supported initially. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1734947 13f79535-47bb-0310-9956-ffa450edef68
* Fix doc string for QualifyRedirectURL, and related typo in manualJeff Trawick2016-03-131-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1734835 13f79535-47bb-0310-9956-ffa450edef68
* core: Extend support for setting aside data from the network input filterGraham Leggett2016-03-121-2/+2
| | | | | | | to any connection or request input filter. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1734656 13f79535-47bb-0310-9956-ffa450edef68
* Fix a bug in <UnDefine ...> directive processing. When used, the last ↵Christophe Jaillet2016-02-281-1/+1
| | | | | | | | <Define...>'ed variable was also withdrawn. PR 59019 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1732716 13f79535-47bb-0310-9956-ffa450edef68
* Save a few bytes in conf pool when parsing 'DocumentRoot' directive on some OS.Christophe Jaillet2016-02-251-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1732353 13f79535-47bb-0310-9956-ffa450edef68
* Save a few bytes in conf pool when parsing 'DefaultRuntimeDir' directive.Christophe Jaillet2016-02-251-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1732252 13f79535-47bb-0310-9956-ffa450edef68
* mpm: Add a complete_connection hook that confirms whether an MPM is allowedGraham Leggett2016-02-191-1/+3
| | | | | | | to leave the WRITE_COMPLETION phase. Move filter code out of the MPMs. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1731253 13f79535-47bb-0310-9956-ffa450edef68
* Introduce an ap_get_useragent_host() accessor to replace the oldWilliam A. Rowe Jr2016-02-121-13/+96
| | | | | | | | | | | | | | | | | | | ap_get_remote_host() in most applications, but preserve the original behavior for all ap_get_remote_host() consumers (mostly, because we don't have the request_rec in the first place, and also to avoid any unintended consequences). This accessor continues to store the remote_host of connection based uesr agents within the conn_rec for optimization. Only where some other module modifies the useragent_addr will we perform a per-request query of the remote_host. (Fixed compilation issues noted by Ranier, applies to 2.4.x trunk, modulo CHANGES and ap_mmn.h) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1729929 13f79535-47bb-0310-9956-ffa450edef68
* Unwind commit 1729901 (and 1729926), it was not ready for trunkWilliam A. Rowe Jr2016-02-121-89/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1729928 13f79535-47bb-0310-9956-ffa450edef68
* Fix compile error:Rainer Jung2016-02-121-5/+5
| | | | | | | | | | - missing semicolons - s/req/r/ Followup to r1729901 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1729926 13f79535-47bb-0310-9956-ffa450edef68
* Introduce an ap_get_useragent_host() accessor to replace the oldWilliam A. Rowe Jr2016-02-111-10/+89
| | | | | | | | | | | | | | | | | ap_get_remote_host() in most applications, but preserve the original behavior for all ap_get_remote_host() consumers (mostly, because we don't have the request_rec in the first place, and also to avoid any unintended consequences). This accessor continues to store the remote_host of connection based uesr agents within the conn_rec for optimization. Only where some other module modifies the useragent_addr will we perform a per-request query of the remote_host. (Committed previously, but backed out due to unrelated core.c changes) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1729901 13f79535-47bb-0310-9956-ffa450edef68
* Revert r1729897, 1729898, my copy of core.c was polluted by a different patchWilliam A. Rowe Jr2016-02-111-114/+32
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1729899 13f79535-47bb-0310-9956-ffa450edef68
* Introduce an ap_get_useragent_host() accessor to replace the oldWilliam A. Rowe Jr2016-02-111-32/+114
| | | | | | | | | | | | | | | | ap_get_remote_host() in most applications, but preserve the original behavior for all ap_get_remote_host() consumers (mostly, because we don't have the request_rec in the first place, and also to avoid any unintended consequences). This accessor continues to store the remote_host of connection based uesr agents within the conn_rec for optimization. Only where some other module modifies the useragent_addr will we perform a per-request query of the remote_host. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1729897 13f79535-47bb-0310-9956-ffa450edef68
* 1726233 temporarily broke UDS r->handler case sensitivityEric Covener2016-02-091-1/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1729374 13f79535-47bb-0310-9956-ffa450edef68
* from feedback, assume all parameters to SetHandler are expressions.Eric Covener2016-01-221-19/+12
| | | | | | | | I couldnt come up with a plausible handler name that was an invalid expression. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1726233 13f79535-47bb-0310-9956-ffa450edef68
* Added many log numbers to log statements thatRainer Jung2016-01-191-1/+1
| | | | | | | | | | | | | | 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
* allow expressions to be used in SetHandler. Opt-in with expr= prefix.Eric Covener2016-01-181-2/+30
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725149 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1715876: core directives' tokens are ASCII.Yann Ylavic2015-12-301-90/+90
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1722252 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1715876: core directives are ASCII.Yann Ylavic2015-12-301-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1722251 13f79535-47bb-0310-9956-ffa450edef68
* Use 'ap_array_str_contains' to simplify code.Christophe Jaillet2015-12-111-11/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1719254 13f79535-47bb-0310-9956-ffa450edef68
* Revert r1715289 (Connection header field should use "upgrade" instead of ↵Christophe Jaillet2015-11-191-2/+2
| | | | | | | | "Upgrade") This is case-insensitive, so no need for such a change. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715294 13f79535-47bb-0310-9956-ffa450edef68
* Connection header field should use "upgrade" instead of "Upgrade"Christophe Jaillet2015-11-191-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715289 13f79535-47bb-0310-9956-ffa450edef68
* Save a few bytes in conf pool when processing 'Define'.Christophe Jaillet2015-11-061-9/+16
| | | | | | | + some minor style issues + split long lines git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1713043 13f79535-47bb-0310-9956-ffa450edef68
* Save a few bytes in conf pool when processing 'AllowOverrideList'.Christophe Jaillet2015-11-061-2/+3
| | | | | | | | | The 'override_list' table is allocated from the cmd->pool, just as all strings from argv[]. So there is no need to duplicate them. + some minor style issues git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1713040 13f79535-47bb-0310-9956-ffa450edef68
* first request on master connection only reports more preferred protocols in ↵Stefan Eissing2015-10-261-1/+1
| | | | | | Upgrade header git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1710583 13f79535-47bb-0310-9956-ffa450edef68
* disabling protocol upgrades on slave connectionsStefan Eissing2015-10-261-5/+13
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1710572 13f79535-47bb-0310-9956-ffa450edef68
* Make the fix for fully qualifying REDIRECT_URL from PR#57785 opt-in. Eric Covener2015-10-241-0/+16
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1710380 13f79535-47bb-0310-9956-ffa450edef68
* announce protocol choices on first requestStefan Eissing2015-10-231-0/+12
| | | | 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-2/+1
| | | | | | 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
* Add the AsyncFilter directive that allows the asynchronous filterGraham Leggett2015-10-071-4/+41
| | | | | | | functionality to be switched off for certain classes of filters. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1707161 13f79535-47bb-0310-9956-ffa450edef68
* core: Extend support for asynchronous write completion from theGraham Leggett2015-10-041-0/+6
| | | | | | | network filter to any connection or request filter. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1706669 13f79535-47bb-0310-9956-ffa450edef68
* axe unused variableJeff Trawick2015-09-121-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1702648 13f79535-47bb-0310-9956-ffa450edef68
* changed Protocols default to http/1.1 only, updated documentation, changed ↵Stefan Eissing2015-09-031-1/+2
| | | | | | 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
* adding ap_get_protocol(c) which safeguards against NULL returns, for use ↵Stefan Eissing2015-08-261-7/+1
| | | | | | 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
* changed Protocols to let vhosts override servers, removed old H2Engine ↵Stefan Eissing2015-08-241-1/+2
| | | | | | example from readme git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1697339 13f79535-47bb-0310-9956-ffa450edef68
* removed unnecessary lingering_close and sbh update on end of protocol ↵Stefan Eissing2015-08-171-7/+0
| | | | | | upgrade handling git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1696266 13f79535-47bb-0310-9956-ffa450edef68
* new directive ProtocolsHonorOrder, added documentation for Protocols ↵Stefan Eissing2015-08-131-4/+34
| | | | | | 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
* c89Eric Covener2015-08-031-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1693918 13f79535-47bb-0310-9956-ffa450edef68
* removed accidental codeStefan Eissing2015-07-241-3/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1692516 13f79535-47bb-0310-9956-ffa450edef68