1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-25 07:01:39 +03:00
Commit Graph

3166 Commits

Author SHA1 Message Date
Victor J. Orlikowski
d982829aa1 Continue the Bill Rowe apr_size_t crusade.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95993 13f79535-47bb-0310-9956-ffa450edef68
2002-07-10 06:01:14 +00:00
William A. Rowe Jr
2604f8bdbb Changes for deprecated apr_is_fnmatch
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95976 13f79535-47bb-0310-9956-ffa450edef68
2002-07-08 17:43:34 +00:00
Bill Stoddard
8286cb80fd Optimize reading keep-alive requests with APR_INCOMPLETE_READ. In the
profiling I've done, the read() in apr_read() would always fail with
EAGAIN. This will send the thread directly to select to wait for the
next request.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95968 13f79535-47bb-0310-9956-ffa450edef68
2002-07-07 16:35:20 +00:00
Ian Holsman
6deba78a9a Renames Pending:
This clears the list of renames pending in apr-util.
 Parts of this list was alreadu done, but the pending list hadn't been updated.

 apr_hook_debug_current     from apr_current_hooking_module
 apr_hook_debug_show        from apr_show_hook

 apr_hook_global_pool       from apr_global_hook_pool
 apr_hook_sort_all          from apr_sort_hooks

 apr_uri_port_of_scheme     from apr_uri_default_port_for_scheme
 apr_uri_unparse            from apr_uri_unparse_components
 apr_uri_parse              from apr_uri_parse_components
 apr_uri_parse_hostinfo     from apr_uri_parse_hostinfo_components

 apr_uri_t                  from apr_uri_components

 All APR_URI_*              from all APU_URI_* symbols
 All APR_UNP_*              from all UNP_* symbols

PR:
Obtained from:
Submitted by:	 Thom May
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95966 13f79535-47bb-0310-9956-ffa450edef68
2002-07-06 20:04:38 +00:00
Bill Stoddard
7a939b3e69 Fix some Win32 compile breaks caused by Brian Pane's making apr_table_t
a full incomplete type.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95965 13f79535-47bb-0310-9956-ffa450edef68
2002-07-06 02:49:59 +00:00
Brian Pane
6cbe41d3fe use new time conversion macros in place of APR_USEC_PER_SEC
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95961 13f79535-47bb-0310-9956-ffa450edef68
2002-07-05 00:53:12 +00:00
Ryan Bloom
da0969fda8 Get the perchild MPM starting different child processes with different
users and groups.  It doesn't pass requests between child processes yet.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95918 13f79535-47bb-0310-9956-ffa450edef68
2002-06-30 21:59:50 +00:00
Brian Pane
27b74224a5 Replaced APR_USEC_PER_SEC division with apr_time_sec macro
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95917 13f79535-47bb-0310-9956-ffa450edef68
2002-06-30 18:20:13 +00:00
Brian Pane
6b484e7e60 Replaced APR_USEC_PER_SEC division with the new apr_time_sec() macro
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95916 13f79535-47bb-0310-9956-ffa450edef68
2002-06-30 04:30:41 +00:00
Brian Pane
980fac58f3 Replaced APR_USEC_PER_SEC division with the new apr_time_sec() macro
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95915 13f79535-47bb-0310-9956-ffa450edef68
2002-06-30 03:53:32 +00:00
Brian Pane
667d57fb5b Replaced APR_USEC_PER_SEC division with the new apr_time_sec() macro
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95913 13f79535-47bb-0310-9956-ffa450edef68
2002-06-30 03:46:56 +00:00
William A. Rowe Jr
9e8f6c73bb Prevent us from getting stuck in a NULL provider hash.
Reported by: Sebastian Bergmann


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95908 13f79535-47bb-0310-9956-ffa450edef68
2002-06-28 16:08:22 +00:00
Justin Erenkrantz
798c1dae43 Add a filter_init function to the filters so that a filter can execute
arbitrary code before the handlers are invoked.

This resolves an issue with incorrect 304s on If-Modified-Since mod_include
requests since ap_meets_conditions() is not aware that this is a dynamic
request and it is not possible to satisfy 304 for these requests (unless
xbithack full is on, of course).  When mod_include runs as a filter, it is
too late to set any flag since the handler is responsible for calling
ap_meets_conditions(), which it should do before generating any data.

If a module doesn't need to run such arbitrary code, it can just pass NULL
as the argument and all is well.

PR:	9673
Reviewed by:	Ryan Bloom and others


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95906 13f79535-47bb-0310-9956-ffa450edef68
2002-06-28 08:40:25 +00:00
Ryan Bloom
b274510242 Fix a long-standing bug in 2.0, CGI scripts were being called
with relative paths instead of absolute paths.  Apache 1.3 used
absolute paths for everything except for SuExec, this brings back
that standard.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95899 13f79535-47bb-0310-9956-ffa450edef68
2002-06-27 06:07:58 +00:00
Justin Erenkrantz
561d4c3874 Strengthen error-detection code in HTTP_IN and core_input_filter so that
invalid readbytes or errors reading brigades are properly handled.

Reviewed by:	Brian Pane


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95897 13f79535-47bb-0310-9956-ffa450edef68
2002-06-27 05:18:19 +00:00
Justin Erenkrantz
32e15557ff Fix infinite loop when reading certain data due to two HTTP_IN filters being
present for internally redirected requests.

If HTTP_IN is present, r->proto_input_filters would have it, so adding it
twice is wrong.

PR: 10146
Reviewed by:	Brian Pane


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95895 13f79535-47bb-0310-9956-ffa450edef68
2002-06-27 04:40:47 +00:00
Justin Erenkrantz
001b387bcd Change conn_rec->keepalive to an enumerated value of
AP_CONN_UNKNOWN
AP_CONN_CLOSE
AP_CONN_KEEPALIVE

This also fixes a problem where ap_discard_request_body would not discard
the body when keepalive was 0.  This actually meant the keepalive status
was unknown *not* closed, but no one ever remembered that.

This problem was seen with mod_dav sending error responses (as reported by
Karl Fogel).

Suggested by:	Greg "this isn't the '80s" Stein
Reviewed by:	Greg Ames


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95891 13f79535-47bb-0310-9956-ffa450edef68
2002-06-26 19:45:07 +00:00
Jeff Trawick
b76b71d612 Fix mod_ext_filter to look in the main server for filter definitions
when running in a vhost if the filter definition is not found in
the vhost.

PR:    10147


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95888 13f79535-47bb-0310-9956-ffa450edef68
2002-06-26 13:01:50 +00:00
Greg Ames
2a9d69a140 ap_discard_request_body: exit without reading the body if
connection->keepalive is false.  This works in conjunction with
ap_die which resets connection->keepalive any time
ap_status_drops_connection is true.  The latter is explicity tested
here in case ap_die isn't involved.

Submitted by:   Justin Erenkrantz, Greg Ames


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95882 13f79535-47bb-0310-9956-ffa450edef68
2002-06-24 17:06:19 +00:00
Cliff Woolley
7e6aae3787 Include apr_lib.h for the definition of apr_toupper() to get rid of
undefined symbol link failures (apr_toupper is a macro, at least on
Unix).

Reported by:  Trawick's regression build


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95878 13f79535-47bb-0310-9956-ffa450edef68
2002-06-24 07:17:36 +00:00
William A. Rowe Jr
2d094adecf Replace gunk with ap_regkey calls.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95876 13f79535-47bb-0310-9956-ffa450edef68
2002-06-24 04:55:24 +00:00
William A. Rowe Jr
5f0df8fdcf The fix wasn't healthy for Win9x. Work around pre-Unicode flavors.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95868 13f79535-47bb-0310-9956-ffa450edef68
2002-06-23 09:52:55 +00:00
William A. Rowe Jr
4de557782a Fixes Win32 cgi 500 errors when QUERY_ARGS or other strings include
extended characters (non US-ASCII) in non-utf8 format.  This brings
  Win32 back into CGI/1.1 compliance, and leaves charset decoding up
  to the cgi application itself.

  Accomplished this by utf-8 encoding of plain octets for user and header
  data, so that the apr_proc_create() translates back to single unicode
  characters.  This won't necessarily translate into the correct octet
  depending on the codepage used by the cgi app.  That's the next task.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95865 13f79535-47bb-0310-9956-ffa450edef68
2002-06-23 07:56:41 +00:00
William A. Rowe Jr
d47c04faed Whoops... removal of the last compat was just this bit premature.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95864 13f79535-47bb-0310-9956-ffa450edef68
2002-06-23 06:46:52 +00:00
William A. Rowe Jr
f931b8a7c0 The real pain. ap->apr xml and text types.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95862 13f79535-47bb-0310-9956-ffa450edef68
2002-06-23 06:42:13 +00:00
William A. Rowe Jr
6e3c0c6418 cleanup uses of apr_ischar() macros (no cast required)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95858 13f79535-47bb-0310-9956-ffa450edef68
2002-06-23 06:13:17 +00:00
William A. Rowe Jr
022e36dc3e That's apr, not ap (any longer)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95857 13f79535-47bb-0310-9956-ffa450edef68
2002-06-23 06:12:09 +00:00
William A. Rowe Jr
277c41423f No crutches.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95856 13f79535-47bb-0310-9956-ffa450edef68
2002-06-23 06:10:00 +00:00
William A. Rowe Jr
e5622c2462 Use apr_ variants of ischar() tests.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95855 13f79535-47bb-0310-9956-ffa450edef68
2002-06-23 06:08:51 +00:00
William A. Rowe Jr
f8511d81d8 No crutches, people!
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95854 13f79535-47bb-0310-9956-ffa450edef68
2002-06-23 06:06:25 +00:00
William A. Rowe Jr
7f1ed02c5e Simplify add_ssi_vars() and move the ssi/cgi vars into their respective
functions [so we may address r->subprocess_env in the ap_cgi_build_command
  win32 handler.]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95853 13f79535-47bb-0310-9956-ffa450edef68
2002-06-23 04:05:17 +00:00
William A. Rowe Jr
9f4d3ce860 s/cgi/cgid might be just a little agressive - fix a comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95852 13f79535-47bb-0310-9956-ffa450edef68
2002-06-23 04:03:21 +00:00
Bill Stoddard
2751c57453 Cleanup some leftover cruft from the last commit.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95847 13f79535-47bb-0310-9956-ffa450edef68
2002-06-22 19:29:15 +00:00
Bill Stoddard
7ef821fd1b Move the req_hdrs pointer from the cache_object_t to the cache_handle_t. Each
thread serving a request needs to update the req_hdrs pointer so it needs to
reside in r->pool (where the cache_handle_t resides).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95846 13f79535-47bb-0310-9956-ffa450edef68
2002-06-22 19:22:40 +00:00
William A. Rowe Jr
c959a9ace8 Note the changed meaning of the NULL next_filter argument to the
ap_sub_req_lookup() family, and fix a few oddball cases (those are,
  PATH_TRANSLATED reference issues.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95844 13f79535-47bb-0310-9956-ffa450edef68
2002-06-22 16:32:45 +00:00
Ian Holsman
dd2ac7d1c8 new configuration option for mod_rewrite to set cookies.
configuration is like the following

RewriteRule (.*) - [CO=<cookiename>:$1:<domain>:<expiry in minutes>]

Submitted by:	Brian Degenhardt <bmd@mp3.com>
Reviewed by:	Ian Holsman


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95840 13f79535-47bb-0310-9956-ffa450edef68
2002-06-22 03:36:57 +00:00
Bradley Nicholes
7dfce43586 Fixing up some copy commands in the NetWare make files during the install
phase of the build.

Submitted by: Guenter Knauf [eflash@gmx.net]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95837 13f79535-47bb-0310-9956-ffa450edef68
2002-06-21 18:57:24 +00:00
Jeff Trawick
b61237dec0 reword an error message
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95835 13f79535-47bb-0310-9956-ffa450edef68
2002-06-21 14:30:23 +00:00
Greg Ames
38de4bc46f ap_die: get rid of bad side effects from the recursive error handling code
that mess with the status and which request_rec the rest of the function uses.

Submitted by:  Justin Erenkrantz, Greg Ames


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95834 13f79535-47bb-0310-9956-ffa450edef68
2002-06-21 13:58:39 +00:00
Greg Ames
54b431dfb6 prevent infinite recursion if an ErrorDocument gets an error
Reported by: Colm MacC�rthaigh <colmmacc@Redbrick.DCU.IE>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95825 13f79535-47bb-0310-9956-ffa450edef68
2002-06-20 19:34:28 +00:00
Brian Pane
1e62099704 Remove the old EOS logic that I neglected to delete on the last commit,
and add a check for ap_pass_brigade() failure


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95818 13f79535-47bb-0310-9956-ffa450edef68
2002-06-20 03:45:21 +00:00
Brian Pane
13eb0a8e7c Cleaner handling of unterminated SSI directives
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95817 13f79535-47bb-0310-9956-ffa450edef68
2002-06-20 02:59:25 +00:00
Aaron Bannert
c37b7fb8b5 Better document the error cases returned from get_chunk_size().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95810 13f79535-47bb-0310-9956-ffa450edef68
2002-06-19 18:43:28 +00:00
Brian Pane
c6f413d754 Fixed the EOS handling for partial SSI directives at the end of
brigades.  (This was causing us to produce no output, not even
an HTTP response header, for a document containing an unterminated
"<!--#" directive


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95803 13f79535-47bb-0310-9956-ffa450edef68
2002-06-19 07:21:45 +00:00
Roy T. Fielding
6753f54344 It isn't valid to check errno without setting it first, unless an
error return value already indicated that errno was set.  Also, we might
as well accept any error or junk remaining in the field as a parse error.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95743 13f79535-47bb-0310-9956-ffa450edef68
2002-06-18 00:14:21 +00:00
Justin Erenkrantz
3ea796a166 Do not use atol() for the Content-Length parsing as its handling of error
cases is undetermined by the ANSI C standard.

Instead, use strtol() with a check for the ERANGE error condition.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95740 13f79535-47bb-0310-9956-ffa450edef68
2002-06-17 22:46:30 +00:00
Bill Stoddard
81c55e8f94 Eliminate segfault we were seeing in mod_mem_cache when collecting an expired
entry from the cache. Ian?


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95737 13f79535-47bb-0310-9956-ffa450edef68
2002-06-17 22:39:09 +00:00
William A. Rowe Jr
723742b066 These emits occur mainline, outside of the pphrase_callback, so we never
opened readtty or writetty.  But they are absolute failures, nothing the
  user could do to deal with them.  They are logged in the ssl vhost's error
  log.

  In this case, I forgot my SSLCertificateKeyFile, so the server never
  tried the callback.  writetty wasn't initialized, so we segfaulted.

  This segfault is due to misconfig, not to the dialog with the user.
  This is the easiest fix (easier to read, too), but we shouldn't need
  to worry too much that the release is tagged.  If we retag, fine, then
  grab it, but it only addresses a config problem.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95734 13f79535-47bb-0310-9956-ffa450edef68
2002-06-17 19:39:19 +00:00
Justin Erenkrantz
b7319396a7 Rewrite ap_get_client_block to rely on assumptions that have been
solidified after this code was originally written.  Namely:

- AP_MODE_READBYTES will only return a brigade representing AT MOST bytes
  of data.  It can NOT return MORE than requested.
- APR_BLOCK_READ is respected - it is considered a design error of a filter
  if it returns without reading something.
- apr_brigade_flatten is available to do the heavy lifting of the copying
  into a flat buffer (as hinted at by the removed comment).

Tested with httpd-test.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95721 13f79535-47bb-0310-9956-ffa450edef68
2002-06-17 05:09:45 +00:00
Ian Holsman
cc5d29c4d0 remove a redundant piece of code
Submitted By: Wayne Pascoe <wayne@pengiunpowered.org.uk>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95720 13f79535-47bb-0310-9956-ffa450edef68
2002-06-17 01:59:32 +00:00