Commit Graph

146 Commits

Author SHA1 Message Date
5a649184dc Make REDIRECT_URL a complete URL (where set).
PR 57785


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1677702 13f79535-47bb-0310-9956-ffa450edef68
2015-05-04 22:05:14 +00:00
d49e6f0ad9 core: Add CGIPassAuth directive to control whether HTTP authorization
headers are passed to scripts as CGI variables.

PR: 56855


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1642847 13f79535-47bb-0310-9956-ffa450edef68
2014-12-02 12:20:21 +00:00
fb0ad3fd89 Turn some APR_BUCKET_REMOVE(e)+apr_bucket_destroy(e) into the equivalent apr_bucket_delete(e) to reduce code verbosity
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1615026 13f79535-47bb-0310-9956-ffa450edef68
2014-08-01 04:23:50 +00:00
56d0c25725 Add missing APLOGNO.
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
2014-07-20 09:32:58 +00:00
bb69ec6cfe Remove useless tests.
Turn
   if (*x && apr_isspace(*x))
into
   if (apr_isspace(*x))

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1452128 13f79535-47bb-0310-9956-ffa450edef68
2013-03-03 21:25:46 +00:00
85ed636d1d Avoid some memory allocation on error path in 'http2env' if TRACE1 logging is not activated.
Avoid a function call to 'apr_filepath_name_get' which ends up to a strrchr call, if TRACE1 logging is not activated. 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451478 13f79535-47bb-0310-9956-ffa450edef68
2013-03-01 06:33:40 +00:00
c7721a9e32 remove an unnecessary check in a nest loop of ap_create_environment()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1378178 13f79535-47bb-0310-9956-ffa450edef68
2012-08-28 15:35:18 +00:00
56b1a71fe3 Apply the same length limit when logging Status header values
as used when logging invalid header lines.

Application of a limit on logged header data suggested by Jeff Trawick.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1376695 13f79535-47bb-0310-9956-ffa450edef68
2012-08-23 20:57:32 +00:00
36ab7eb1eb Log the value of Status header lines in script responses rather than
than just the fixed header name of "Status".


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1362538 13f79535-47bb-0310-9956-ffa450edef68
2012-07-17 15:26:27 +00:00
165e11ee96 Fix error handling in ap_scan_script_header_err_brigade() if there
is no EOS bucket in the brigade:

Also don't loop if there is a timeout when discarding the script output.

Thanks to Edgar Frank for the analysis.

PR: 48272 (partial fix)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1311174 13f79535-47bb-0310-9956-ffa450edef68
2012-04-09 09:35:35 +00:00
e9ac8ddb83 Make sure the getsfunc_*() functions used by ap_scan_script_header_err*()
NUL-terminate the resulting string, even in case of an error. mod_cgi
and mod_cgid try to log incomplete output from CGI scripts.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1244211 13f79535-47bb-0310-9956-ffa450edef68
2012-02-14 21:18:22 +00:00
732f60dc2c Handle cases, esp when using mod_proxy_fcgi, when we do not
want SCRIPT_FILENAME to include the query string.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1242351 13f79535-47bb-0310-9956-ffa450edef68
2012-02-09 15:07:22 +00:00
cb21a0dbcc Further clarify the naming of the entity that directly connects to us by
calling that entity a client instead of a peer.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1214015 13f79535-47bb-0310-9956-ffa450edef68
2011-12-14 01:10:52 +00:00
ad489c105b Further clarify the naming of the entity that originates the request by
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
2011-12-14 00:33:46 +00:00
394e5594d6 Introduce a per connection "peer_ip" and a per request "client_ip" to
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
2011-11-25 19:42:04 +00:00
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
481fac5ce2 Make the SERVER_NAME variable include [ ] for literal IPv6 addresses, as
mandated by RFC 3875

PR: 26005


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1147614 13f79535-47bb-0310-9956-ffa450edef68
2011-07-17 13:56:28 +00:00
beb3ea9c11 Add more (trace) logging to the ap_scan_script_header*() functions
Add ap_scan_script_header*_ex() functions that take a module index for
logging.
Make mod_cgi, mod_cgid, mod_proxy_fcgi, mod_proxy_scgi, mod_isapi use the
new functions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1147493 13f79535-47bb-0310-9956-ffa450edef68
2011-07-16 21:53:18 +00:00
255b79ce73 improve readability of 'malformed header from script' message and simplify code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1147487 13f79535-47bb-0310-9956-ffa450edef68
2011-07-16 20:36:11 +00:00
c9fd2623da Introduce ap_(get|set)_core_module_config() functions/macros and use them
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
2011-06-06 21:26:56 +00:00
feca55db60 - Introduce concept of context prefix (which is an URL prefix)
and context document root (which is the file system directory that
  this URL prefix is mapped to). This generalization of the document
  root makes it easier for scripts to create self-referential URLs and
  to find their files.
- Expose CONTEXT_DOCUMENT_ROOT and CONTEXT_PREFIX as envvars, in mod_rewrite,
  and in ap_expr.
- Make mod_alias and mod_userdir set the context information.
- Allow to override the document root on a per-request basis. This allows
  mass vhosting modules to set DOCUMENT_ROOT correctly.
- Make mod_vhost_alias set the per-request document root

PR: 26052, 46198, 49705

Remaining tasks:
- Use the context document root & prefix in mod_rewrite to make RewriteBase
  unneccessary in many cases. Do this without breaking compatibility.
- Write docs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1132494 13f79535-47bb-0310-9956-ffa450edef68
2011-06-05 21:33:12 +00:00
6c6979ede6 Make the REQUEST_SCHEME variable available to scripts and mod_rewrite
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053872 13f79535-47bb-0310-9956-ffa450edef68
2010-12-30 12:34:19 +00:00
8ef0eb9c77 Log a trace message if we drop a header with an invalid name
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053365 13f79535-47bb-0310-9956-ffa450edef68
2010-12-28 14:53:59 +00:00
2ae41fa476 Move duplicated code into utility functions
Submitted by: Malte S. Stretz <mss@apache.org>, Stefan Fritsch


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053363 13f79535-47bb-0310-9956-ffa450edef68
2010-12-28 14:48:51 +00:00
afea2a1dc4 When exporting request headers to HTTP_* environment variables, drop variables
whose names contain invalid characters. Describe in the docs how to restore the
old behaviour.

Submitted by: Malte S. Stretz <mss apache org>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053353 13f79535-47bb-0310-9956-ffa450edef68
2010-12-28 14:20:52 +00:00
6c3b1e2ec5 Because PATH and the library path are closely interrelated, and the cause
of most confusion over cgi or fcgid failures, or even starting rotatelogs,
etc, when the server binaries have been relocated, pass the library path
as paired with the system PATH.

Of course, PATH and platform-specific library path(s) may be modified as
needed with mod_env, so there is no loss of functionality with this change.

The days of monolithic binaries are long gone, even on 1970's architectures,
and PATH should not be decoupled from the library path.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1000593 13f79535-47bb-0310-9956-ffa450edef68
2010-09-23 19:50:14 +00:00
344a7acdc3 Enable SetEnv to set PATH
PR 43906


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@965679 13f79535-47bb-0310-9956-ffa450edef68
2010-07-19 23:40:25 +00:00
7716d3c3e3 Drop ap_body_to_table due to missing constraints; a DoS waiting
for an exploit.

Some mod_lua fan aught to revisit this and provide a sensible
implementation.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@953203 13f79535-47bb-0310-9956-ffa450edef68
2010-06-10 03:02:07 +00:00
ebb62867fb Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
advantage of per-module loglevels


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:59:50 +00:00
0534f5f339 Fix string constness to get rid of gcc compiler warnings by -Wwrite-strings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@894368 13f79535-47bb-0310-9956-ffa450edef68
2009-12-29 12:34:26 +00:00
3e338e488c Elaborate on low hanging XXX fruit
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@885689 13f79535-47bb-0310-9956-ffa450edef68
2009-12-01 08:44:11 +00:00
3353db1086 added comment about the never reached return statement.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@819893 13f79535-47bb-0310-9956-ffa450edef68
2009-09-29 12:08:28 +00:00
60fbe11de1 Bring back OS/2 support.
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
2009-08-26 08:56:13 +00:00
1026b83608 http://marc.info/?l=apache-httpd-dev&m=123845333914309&w=2
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@760379 13f79535-47bb-0310-9956-ffa450edef68
2009-03-31 09:32:14 +00:00
7fe4728a29 HTTPD script support
When a script returns a no-body response code, pretend it was a HEAD
request so as to drop any body the script might erroneously generate.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@760167 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 20:49:10 +00:00
ee32468a33 remove OS/2 platform support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758929 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 23:47:52 +00:00
2f9b9fdd70 remove BeOS OS support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758891 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 22:23:44 +00:00
801a5aa379 document some nonsense it may be sizeof off_t > sizeof size_t.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@730815 13f79535-47bb-0310-9956-ffa450edef68
2009-01-02 19:01:01 +00:00
3dc8a45a64 CGI: return 504 (Gateway timeout) rather than 500 when a script
times out before returning status line/headers.
PR 42190


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@729586 13f79535-47bb-0310-9956-ffa450edef68
2008-12-27 03:53:32 +00:00
7ff39c3567 Remove commented out block that wouldn't even work in this context.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@724084 13f79535-47bb-0310-9956-ffa450edef68
2008-12-07 05:51:23 +00:00
2b494140a5 Don't pass in a pool to to argstr_to_table, and duplicate r->args before sending it in.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@724080 13f79535-47bb-0310-9956-ffa450edef68
2008-12-07 05:45:31 +00:00
03eb917952 New API, ap_body_to_table, a very ineffeicent and bad hack to remove an apreq dependency.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/wombat-integration@723652 13f79535-47bb-0310-9956-ffa450edef68
2008-12-05 08:36:26 +00:00
ba87dcea6a Add new api, ap_args_to_table, to parse a request's arguments into a table.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/wombat-integration@723627 13f79535-47bb-0310-9956-ffa450edef68
2008-12-05 07:15:22 +00:00
a324a1d72f Remove all references to CORE_PRIVATE.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645455 13f79535-47bb-0310-9956-ffa450edef68
2008-04-07 10:45:43 +00:00
94d6c33002 detabify
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@563244 13f79535-47bb-0310-9956-ffa450edef68
2007-08-06 20:02:27 +00:00
bd03736495 * Also add a possible ETag header to r->headers_out. We need to have it there
for our later call to ap_meets_conditions a few lines above. Having it put
  in the merge table will fail as merge and r->err_headers_out get merged
  AFTER our call to ap_meets_conditions. Besides of this having multiple
  ETag headers (or a merged version of them) does not seem to make sense.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@541974 13f79535-47bb-0310-9956-ffa450edef68
2007-05-27 11:26:04 +00:00
743a621e8d Replace ap_get_server_version with ap_get_server_banner() and
ap_get_server_description().

High-level summary:

The full server version information is now included in the error log at
startup as well as server status reports, irrespective of the setting
of the ServerTokens directive.

Third-party modules must now use ap_get_server_banner() or 
ap_get_server_description() in place of ap_get_server_version().



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@440337 13f79535-47bb-0310-9956-ffa450edef68
2006-09-05 13:08:15 +00:00
de659cbed0 update license header text
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:33:53 +00:00
dd95d7c37c Update the copyright year in all .c, .h and .xml files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:11:27 +00:00
36013888ad PR#38070: When a CGI script emits an explicit "Status:" header,
it takes charge, so we shouldn't use ap_meets_conditions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@370692 13f79535-47bb-0310-9956-ffa450edef68
2006-01-20 01:36:44 +00:00