summaryrefslogtreecommitdiffstats
path: root/server/request.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Revert r4635428 corresponding to PR41867.William A. Rowe Jr2015-01-211-7/+0
| | | | | | | | | | | | | | | | | | | | | | The code reverted attempted to restrict comparisons of the r->filename to given DirectoryMatch blocks. r->filename was already a non-directory entity at this point, because we have already fallen out of the } while (thisinfo.filetype == APR_DIR); block above. The addition of r->d_is_directory was redundant. That is what is always returned by ap_get_core_module_config(r->per_dir_config). Note modifying dir_config required an MMN major bump as this commit could have realigned the offset of refs (had it been added to the end, this would correspond to an mmn minor bump) and other fields packed into the same bytes (this is undefined). Bump on revert to prevent unexpected crashes. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1653666 13f79535-47bb-0310-9956-ffa450edef68
* core: Do not match files when using DirectoryMatch. PR41867.Jan Kaluža2014-10-301-0/+7
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1635428 13f79535-47bb-0310-9956-ffa450edef68
* core: Support named groups and backreferences within the LocationMatch,Graham Leggett2013-12-301-11/+111
| | | | | | | DirectoryMatch, FilesMatch and ProxyMatch directives. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1554300 13f79535-47bb-0310-9956-ffa450edef68
* Add LogLevelOverride directive that allows to override the loglevel forStefan Fritsch2012-12-081-6/+10
| | | | | | | clients from certain IPs git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1418767 13f79535-47bb-0310-9956-ffa450edef68
* add dirwalk_stat hook, for use by mpm-itkJeff Trawick2012-09-211-7/+9
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1388447 13f79535-47bb-0310-9956-ffa450edef68
* ap_sub_req_lookup_dirent() depends on the over-allocation done byStefan Fritsch2012-09-141-1/+1
| | | | | | | | ap_make_full_path and ap_escape_uri, so let's document it so that it is not accidentally removed. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1384924 13f79535-47bb-0310-9956-ffa450edef68
* spelling fixJeff Trawick2012-08-011-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1368131 13f79535-47bb-0310-9956-ffa450edef68
* core: Add post_perdir_config hook.Jeff Trawick2012-08-011-0/+7
| | | | | | | | | Submitted by: Steinar Gunderson <sgunderson bigfoot.com> trawick added/fixed include/ pieces git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1368121 13f79535-47bb-0310-9956-ffa450edef68
* Adjust log message: Condition can be caused by configuration errorStefan Fritsch2012-06-171-2/+6
| | | | | | | not only by bugs git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1351015 13f79535-47bb-0310-9956-ffa450edef68
* add filesystem paths to some common error messages.Eric Covener2012-03-161-4/+5
| | | | | | | | (slightly modified from dev@ post to not bury the "failed/denied") git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1301504 13f79535-47bb-0310-9956-ffa450edef68
* Clean up size_t abuse, part 2. ap_malloc/calloc/realloc are explicitlyWilliam A. Rowe Jr2012-01-061-2/+2
| | | | | | | | | 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
* Further clarify the naming of the entity that originates the request byGraham Leggett2011-12-141-2/+2
| | | | | | | calling that entity a useragent instead of a client. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1214005 13f79535-47bb-0310-9956-ffa450edef68
* Add lots of unique tags to error log messagesStefan Fritsch2011-12-031-15/+15
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
* Introduce a per connection "peer_ip" and a per request "client_ip" toGraham Leggett2011-11-251-2/+2
| | | | | | | | distinguish between the raw IP address of the connection and the effective IP address of the request. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1206291 13f79535-47bb-0310-9956-ffa450edef68
* Introduce a per request version of the remote IP address, which can beGraham Leggett2011-11-221-0/+3
| | | | | | | | optionally modified by a module when the effective IP of the client is not the same as the real IP of the client (such as a load balancer). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204968 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-1/+1
| | | | | | | | Trim trailing whitespace... no func change git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
* Add AllowOverrideList directive and documentationDaniel Ruggeri2011-07-281-2/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1151654 13f79535-47bb-0310-9956-ffa450edef68
* Introduce ap_(get|set)_core_module_config() functions/macros and use themStefan Fritsch2011-06-061-20/+20
| | | | | | | | | | | | everywhere. We know that the core module has module_index 0. Therefore we can save some pointer operations in ap_get_module_config(cv, &core_module) and ap_set_module_config(cv, &core_module, val). As these are called rather often, this may actually have some (small) measurable effect. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1132781 13f79535-47bb-0310-9956-ffa450edef68
* - Add <ElseIf> and <Else> to complement <If> sections. These are both easierStefan Fritsch2011-06-051-7/+22
| | | | | | | | to use and more efficient than using several <If> sections. - Update <If> documentation a bit. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1132469 13f79535-47bb-0310-9956-ffa450edef68
* core: AllowEncodedSlashes new option NoDecode to allow encoded slashesDaniel Earl Poirier2011-03-161-1/+1
| | | | | | | | | | in request URL path info but not decode them. Change behavior of option "On" to decode the encoded slashes as 2.0 and 2.2 do. PR 35256, PR 46830. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082196 13f79535-47bb-0310-9956-ffa450edef68
* Initialize the core_dir_config->sec_files and ->sec_if only if needed.Stefan Fritsch2011-01-181-4/+14
| | | | | | | This saves some memory and two apr_array_append()s per directory merge. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060283 13f79535-47bb-0310-9956-ffa450edef68
* Merge the <If> sections in a separate step ap_if_walk, after ap_location_walk.Stefan Fritsch2011-01-171-15/+125
| | | | | | | | | | | | This makes <If> apply to all requests, not only to file base requests and it allows to use <If> inside <Directory>, <Location>, and <Files> sections. The merging of <If> sections always happens after the merging of <Location> sections, even if the <If> section is embedded inside a <Directory> or <Files> section. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1059867 13f79535-47bb-0310-9956-ffa450edef68
* Save a useless check:Stefan Fritsch2011-01-121-3/+1
| | | | | | | | ap_get_request_note() cannot fail unless there is a bug somewhere and if prep_walk_cache() returned NULL, we would just segfault later on. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1057920 13f79535-47bb-0310-9956-ffa450edef68
* ap_expr related fixes/enhancements:Stefan Fritsch2010-11-211-1/+1
| | | | | | | | | | | - implement regex backreferences and make them available for setting envvars in SetEnvIfExpr - implement nested function calls in %-syntax: %{func1:%{func2:arg}} - actually implement evaluation of concatenation operator (oops...) - Fix <If ... > treating an internal error as success git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037504 13f79535-47bb-0310-9956-ffa450edef68
* Replace ap_expr with a parser derived from mod_ssl's parser. Make mod_ssl useStefan Fritsch2010-11-061-3/+3
| | | | | | | | | | the new parser. Rework ap_expr's public interface and provide hooks for modules to add variables and functions. The Netware and Windows build files still need to be adjusted git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032073 13f79535-47bb-0310-9956-ffa450edef68
* PR#45722: if we get EACCESS in the directory walk, give the hint that's in 1.3Eric Covener2010-11-041-1/+3
| | | | | | | | | | | | | | | about search permissions on intermediate directories. I left the prefix of the message as "denied" instead of "failed" to satisfy web searches. The extended error text was added to 1.3.x but not trunk in http://svn.apache.org/viewvc?view=revision&revision=99781 This plagues users on IRC! git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1031307 13f79535-47bb-0310-9956-ffa450edef68
* PR49809: Allow DirectoryMatch to match the EOL character ($). andEric Covener2010-08-271-1/+1
| | | | | | | | | | stop applying to subdirectories (that don't also match the regex) implicitly. The manual already uses DirectoryMatch syntax that assumes this in other places! git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@990091 13f79535-47bb-0310-9956-ffa450edef68
* Add the same r->user == NULL check in the Satisfy Any code path as r965709 didStefan Fritsch2010-08-181-1/+8
| | | | | | | for Satisfy all git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@986606 13f79535-47bb-0310-9956-ffa450edef68
* Intel's compiler warns about assigning the non-enum value 0 to the Jeff Trawick2010-08-061-10/+10
| | | | | | | | | | | | | | enumeration apr_finfo_t.filetype, which is done when forgetting the previously-derived file type use the appropriate enum value APR_NOFILE instead Also change comparisons of the field with 0 to use APR_NOFILE instead, as is the practice of some existing code. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@983065 13f79535-47bb-0310-9956-ffa450edef68
* remove more unused variablesStefan Fritsch2010-08-041-9/+7
| | | | | | | | | revove some obsolete comments netware file is untested git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@982050 13f79535-47bb-0310-9956-ffa450edef68
* Don't risk segfault in authz if r->user is not setNick Kew2010-07-201-0/+8
| | | | | | | PR 42995 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@965709 13f79535-47bb-0310-9956-ffa450edef68
* fix log messagesStefan Fritsch2010-07-141-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@964161 13f79535-47bb-0310-9956-ffa450edef68
* The approach for allowing authorization by user or IP introduced in r956387,Stefan Fritsch2010-07-141-31/+52
| | | | | | | | | | | | | | | | | | | | | etc. causes problems because the authentication module calls note_*_auth_failure if authentication fails. This is inappropriate if access is later allowed because of the IP. So, instead of calling the auth_checker hook even if authentication failed, we introduce a new access_checker_ex hook that runs between the access_checker and the check_user_id hooks. If an access_checker_ex functions returns OK, the request will be allowed without authentication. To make use of this, change mod_authz_core to walk the require blocks in the access_checker_ex phase and deny/allow the request if the authz result does not depend on an authenticated user. To distinguish a real AUTHZ_DENIED from an authz provider from an authz provider needing an authenticated user, the latter must return the new AUTHZ_DENIED_NO_USER code. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@964156 13f79535-47bb-0310-9956-ffa450edef68
* Don't restore r->user after authn/authz failure. Any authn module that setsStefan Fritsch2010-06-201-7/+0
| | | | | | | r->user even if authentication failed is broken, anyway. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@956395 13f79535-47bb-0310-9956-ffa450edef68
* Fix authorization by user or IP/ENV/...Stefan Fritsch2010-06-201-2/+25
| | | | | | | Note ap_note_auth_failure() breakage in STATUS git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@956387 13f79535-47bb-0310-9956-ffa450edef68
* More trace loggingStefan Fritsch2010-06-201-0/+11
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@956374 13f79535-47bb-0310-9956-ffa450edef68
* - Add loglevels to request_rec and conn_recStefan Fritsch2010-06-061-1/+12
| | | | | | | - Introduce per-directory loglevel configuration git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951897 13f79535-47bb-0310-9956-ffa450edef68
* Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to takeStefan Fritsch2010-06-061-0/+2
| | | | | | | advantage of per-module loglevels git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
* Fix string constness to get rid of gcc compiler warnings by -Wwrite-strings.Takashi Sato2009-12-291-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@894368 13f79535-47bb-0310-9956-ffa450edef68
* Bring back OS/2 support.Brian Havard2009-08-261-1/+1
| | | | | | | Reverses r758929 with a little bit of conflict resolution. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@807930 13f79535-47bb-0310-9956-ffa450edef68
* remove OS/2 platform supportJeff Trawick2009-03-271-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758929 13f79535-47bb-0310-9956-ffa450edef68
* API Cleanup in preperation for 2.4.x, make sure all exported functions or ↵Paul Querna2008-12-021-3/+3
| | | | | | variables contain an ap_ prefix. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@722399 13f79535-47bb-0310-9956-ffa450edef68
* Determine registered authn/z providers directly in ap_setup_auth_internal(),Chris Darroch2008-05-221-16/+7
| | | | | | | | | | | | | | | | which allows optional functions that just wrapped ap_list_provider_names() to be removed from authn/z modules. This change requires modules/aaa/mod_auth.h to be included into server/request.c, which necessitates a minor change to configure.in for Unix platforms. I'm unable to tell whether a similar change is necessary for Windows and NetWare builds or not. Could developers with access to those platforms please test and make any needed configuration or build alterations? Thanks! git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@659160 13f79535-47bb-0310-9956-ffa450edef68
* When testing for slash-terminated configuration paths inChris Darroch2008-05-101-1/+2
| | | | | | | | ap_location_walk(), don't look past the start of an empty string such as that created by a <Location ""> directive. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@654998 13f79535-47bb-0310-9956-ffa450edef68
* mod_request: Insert the KEPT_BODY filter via the insert_filterGraham Leggett2008-05-091-7/+0
| | | | | | | | | hook instead of during fixups. Add a safety check to ensure the filters cannot be inserted more than once. [Graham Leggett, Ruediger Pluem] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@654952 13f79535-47bb-0310-9956-ffa450edef68
* Move the KeptBodySize directive, kept_body filters and theGraham Leggett2008-04-111-2/+3
| | | | | | | | ap_parse_request_body function out of the http module and into a new module called mod_request, reducing the size of the core. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@647263 13f79535-47bb-0310-9956-ffa450edef68
* Remove all references to CORE_PRIVATE.Paul Querna2008-04-071-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645455 13f79535-47bb-0310-9956-ffa450edef68
* Make it compile on pre-C99 compilers (Move decls to beginning of func)Martin Kraemer2008-04-071-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645395 13f79535-47bb-0310-9956-ffa450edef68
* Avoid calling access control hooks for internal requests withChris Darroch2008-04-031-47/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | configurations which match those of the initial request. Revert to the original behaviour (call access control hooks for internal requests with URIs different from the initial request) if any access control hooks or providers are not registered as permitting this optimization. Introduce wrappers for access control hook and provider registration which can accept additional mode and flag data. The configuration walk optimizations were originally proposed a while ago (see http://marc.info/?l=apache-httpd-dev&m=116536713506234&w=2); they have been used since then in production systems and appear to be stable and effective. They permit certain combinations of modules and clients to function efficiently, especially when a deeply recursive series of internal requests, such as those generated by certain WebDAV requests, are all subject to the identical authentication and authorization directives. The major change from the original proposal is a cleaner mechanism for detecting modules which may expect the old behaviour. This has been tested successfully with Subversion's mod_authz_svn, which specifically requires the old behaviour when performing path-based authorization based against its own private access control configuration files. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@644525 13f79535-47bb-0310-9956-ffa450edef68