1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-08 04:22:21 +03:00
Commit Graph

300 Commits

Author SHA1 Message Date
Ian Holsman
df6a0c3e94 new option to ServerTokens. "Maj[or]" which displays a server response
similar to Apache/2.0

Also surfaced the directive in the standard config, defaulting to FULL


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96500 13f79535-47bb-0310-9956-ffa450edef68
2002-08-23 17:24:39 +00:00
Brian Pane
89dd7d9c9d Zero-copy output for small files delivered over keepalive
connections (previously, the setaside code in the core output
filter would copy file buckets <8KB into the heap, resulting
in poor keepalive performance)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96431 13f79535-47bb-0310-9956-ffa450edef68
2002-08-18 07:16:01 +00:00
William A. Rowe Jr
e925d0a202 Pardon je, it seems the most obvious solutions are always the easiest
to incorporate new bugs.  Solve the 0index.html bad uri bug.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96316 13f79535-47bb-0310-9956-ffa450edef68
2002-08-06 20:02:07 +00:00
William A. Rowe Jr
3653eaa40e This was never a 'vulnerability'... the APR_FILEPATH_SECUREROOT flag
passed to apr_filepath_merge refused to merge any rooted 'addpath'.
  However, that isn't the traditional 1.3 behavior, so fly past any
  leading '/'s on the way to merging the uri to the DocumentRoot.

PR: 10946


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96314 13f79535-47bb-0310-9956-ffa450edef68
2002-08-06 16:27:36 +00:00
Ian Holsman
705f189757 format to 80 chars
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96303 13f79535-47bb-0310-9956-ffa450edef68
2002-08-04 15:15:57 +00:00
William A. Rowe Jr
6b69fe06c0 Timeout/time fixes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96055 13f79535-47bb-0310-9956-ffa450edef68
2002-07-15 07:46:19 +00:00
Jeff Trawick
c173b5078d spell check a comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95991 13f79535-47bb-0310-9956-ffa450edef68
2002-07-10 01:07:21 +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
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
Sander Striker
62faca71e7 Add a new directive: MaxMemFree. MaxMemFree makes it possible
to configure the maximum amount of memory the allocators will
hold on to for reuse.  Anything over the MaxMemFree threshold
will be free()d.  This directive is usefull when uncommon large
peaks occur in memory usage.  It should _not_ be used to mask
defective modules' memory use.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95954 13f79535-47bb-0310-9956-ffa450edef68
2002-07-04 15:20:54 +00:00
Brian Pane
8c86d4bf88 Optimized the addition of the core output filter
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95941 13f79535-47bb-0310-9956-ffa450edef68
2002-07-02 21:40:13 +00:00
Brian Pane
d6baa119a0 Replaced ap_add_input_filter() call with cheaper ap_add_input_filter_handle()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95940 13f79535-47bb-0310-9956-ffa450edef68
2002-07-02 21:35:19 +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
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
518af3ff49 - Fix segfault in core_output_filter when we are passed an empty brigade.
- Stash the remainder of the brigade in more when we see a flush bucket.
  Previous to this commit, we would only process the buckets before the
  flush on a HTTP/1.0 request and then return.

We are proably only finding this now since we now correctly check for
keepalive connection status.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95896 13f79535-47bb-0310-9956-ffa450edef68
2002-06-27 05:00:23 +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
Ryan Bloom
4db278ffc8 Make the default_handler catch all requests that aren't served by
another handler.  This also gets us to return a 404 if a directory
is requested, there is no DirectoryIndex, and mod_autoindex isn't
loaded.

PR:	8045
Submitted by:	Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95690 13f79535-47bb-0310-9956-ffa450edef68
2002-06-15 05:49:06 +00:00
William A. Rowe Jr
7af68c0bf5 Solve the 80/20 by initializing and storing server_rec->timeout and
server_rec->keep_alive_timeout in apr_time_interval_t format (in apr
  units, whatever they be), as both values exist to pass into APR, and
  all APR timeouts are in apr_time_t.

Reviewed by:	Cliff Woolley


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95623 13f79535-47bb-0310-9956-ffa450edef68
2002-06-12 23:59:31 +00:00
Ryan Bloom
ca5fd7fb7b The apr_bucket change requires a minor MMN bump. Also modify Apache's
filters to use APR_BUCKET_IS_METADATA macro.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95454 13f79535-47bb-0310-9956-ffa450edef68
2002-05-31 20:52:28 +00:00
William A. Rowe Jr
4f93d4762c Resolve the EXEC_ON_READ bit for ServerRoot and other modules that test
the directive context.  Should eliminate the segfault.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95171 13f79535-47bb-0310-9956-ffa450edef68
2002-05-18 17:22:23 +00:00
William A. Rowe Jr
d9f47b5bc4 Although it appears reasonable to immediately gather the Error log and
level from the config; these are per-vhost entities that can't be
  processed as we preload the config tree.  There is more work to do,
  as Cliff Woolley guesses, before we can make this change.
  In the meantime, -e and -E should provide the admin sufficient options
  to work around problematic configs.  So I'm reverting those changes,
  for now.

  ServerRoot is global only, and it MUST be read immediately, so that
  part of the last patch stays.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95170 13f79535-47bb-0310-9956-ffa450edef68
2002-05-18 16:35:57 +00:00
Cliff Woolley
81c03e82c4 Renames:
APR_XtOffset   -> APR_OFFSET
  APR_XtOffsetOf -> APR_OFFSETOF


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95164 13f79535-47bb-0310-9956-ffa450edef68
2002-05-18 04:13:13 +00:00
William A. Rowe Jr
eb3ac00c5f We need to grab ServerRoot, LogLevel, and ErrorLog right off the bat
as we are reading the config.

  This closes a bug where ServerRoot /foo + LoadModule relative/mod_foo.so
  won't load mod_foo.so.

Reported by: Ron Leung <rleung@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95160 13f79535-47bb-0310-9956-ffa450edef68
2002-05-17 19:34:52 +00:00
Jeff Trawick
c871b41d3c stop using APLOG_NOERRNO in calls to ap_log_?error()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95149 13f79535-47bb-0310-9956-ffa450edef68
2002-05-17 11:11:39 +00:00
Brian Pane
d74c4014cc Added EnableMMAP directive to allow the server administrator to
prevent mmap of file buckets upon read.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95040 13f79535-47bb-0310-9956-ffa450edef68
2002-05-11 23:24:29 +00:00
Brian Pane
bc90009198 Moved ap_setup_make_content_type() declaration to http_protocol.h
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95031 13f79535-47bb-0310-9956-ffa450edef68
2002-05-10 15:08:59 +00:00
Brian Pane
7e2c4f3a54 Performance fix: replaced the strcasecmp calls in ap_make_content_type()
with apr_strmatch()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95026 13f79535-47bb-0310-9956-ffa450edef68
2002-05-10 06:47:13 +00:00
Greg Ames
4c4ea8b348 default_handler: move the code to handle unusual methods out of the middle
of the hot path without using goto.

suggested by: Roy Fielding


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94882 13f79535-47bb-0310-9956-ffa450edef68
2002-04-30 20:12:26 +00:00
Greg Ames
e5234ec416 remove a goto
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94807 13f79535-47bb-0310-9956-ffa450edef68
2002-04-25 20:51:49 +00:00
Greg Ames
6b40ae2b48 default_handler: short circuit the method checks. Move the code to deal
with unusual methods to the end of function to reduce i-cache clutter.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94781 13f79535-47bb-0310-9956-ffa450edef68
2002-04-24 14:31:28 +00:00
Cliff Woolley
768d65eeac AcceptPathInfo was totally backwards... it would reject when set to on and
by default and accept when set to off for the default handler, and would
reject only if set to accept for mod_cgi(d) and mod_isapi.

PR: 8234


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94751 13f79535-47bb-0310-9956-ffa450edef68
2002-04-22 08:08:38 +00:00
William A. Rowe Jr
e5200732d3 Correct partitioning of filter handles between core and http, and
export the handle pointers on Win32.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94468 13f79535-47bb-0310-9956-ffa450edef68
2002-04-05 20:55:00 +00:00
Cliff Woolley
3e2ce19baf BUCKET FREELISTS
Add an allocator-passing mechanism throughout the bucket brigades API.

From Apache's standpoint, the apr_bucket_alloc_t* used throughout a given
connection is stored in the conn_rec by the create_connection hook.  That
means it's the MPM's job to optimize recycling of apr_bucket_alloc_t's --
the MPM must ensure that no two threads can ever use the same one at the
same time, for instance.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94304 13f79535-47bb-0310-9956-ffa450edef68
2002-03-29 08:17:26 +00:00
Ryan Bloom
f44773343a We have to return valid HTTP status codes from filters. This fixes two
cases in the core_output_filters where there was a problem, and the core
returned an error code instead of an HTTP status code.  This keeps us from
putting status codes like 32 and 104 in the access log.

Submitted by:	Ryan Morgan <rmorgan@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94143 13f79535-47bb-0310-9956-ffa450edef68
2002-03-22 21:45:44 +00:00
Jim Jagielski
730e99e461 Fold the compiled-in knowledge of the allowable AcceptMutex settings into
its help entry. Requires the use of a extern string rather than a function
call for the initialization to be valid in the macro (Thx to Jeff!).
In the meantime, bump down the error logging until we deal with true
default and configured setting information ala 1.3.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94062 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 22:19:11 +00:00
Bill Stoddard
76bef9981f Commit 2 of 2 to:
1. rename ap_rset_content_type to ap_set_content_type
2. reverse the arguments to aligh with ap_set_content_length


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94057 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 17:44:13 +00:00
Bill Stoddard
e9ec908a01 Final commit to add ap_rset_content_type accessor. Add AddOutputFiltersbyType
filters during call to ap_rset_content_type()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94028 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 02:05:43 +00:00
William A. Rowe Jr
65a37752ec Eliminate potential ap_server_root_relative segfaults, with the input
of Jeff Trawick's style changes to the first patches.  Doesn't include
  the fixes to ssl [more complex], and we won't trap errors that involve
  ap_serverroot, since we presume that was normalized on the way in.
  Therefore, testing ap_server_root_relative(DEFAULT_FOO) cases
  should never become necessary.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93965 13f79535-47bb-0310-9956-ffa450edef68
2002-03-16 18:26:58 +00:00
Roy T. Fielding
845cbfd508 Update our copyright for this year.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 20:48:07 +00:00
Justin Erenkrantz
3058b601ff As hinted on dev@httpd, change filter naming schemes to match our
expectations of their usage.

The reason that we should make this change now is that we have changed
the implied meaning of AP_FTYPE_HTTP_HEADER - some users of this should
be PROTOCOL while others should be CONTENT_SET.  In order to clarify it,
toss all of the bogus names and force the filter writers to make sure
they understand what they are doing.

CONTENT_SET is new (horrible name - change if you have better idea), but
it indicates that it should run between RESOURCE and PROTOCOL.
mod_deflate is the ideal CONTENT_SET filter.

The changed type names are:
CONTENT is now RESOURCE.
HTTP_HEADER is now PROTOCOL.  However, most filters that used HTTP_HEADER
may want CONTENT_SET.  (Only things like POP and HTTP belong as PROTOCOL.)

MMN bump since all filters need to be recompiled due to filter reordering.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93756 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 09:27:17 +00:00
Ryan Bloom
116497445f Remove the prev pointer from the filter chain. This removes
the complexity of trying to set the filter chain correctly, with the
side-effect of forcing us to walk the entire chain whenever we add
a filter.  Since the filter chains are small, the decrease in
complexity is worth it.
Reviewed by:	Allan Edwards


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93745 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 02:09:30 +00:00
Aaron Bannert
fce3fb4470 Fix a bug in the APR_MODE_EXHAUSTIVE mode for the core input filter.
This patch changes nothing outside of that mode.

Also, why do we ever call apr_brigade_length() in the core? This doesn't
seem right to me, so here's a comment above the other call.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93736 13f79535-47bb-0310-9956-ffa450edef68
2002-03-06 18:03:19 +00:00
Ian Holsman
17cc70b4ab Sander's Stylistic Submission
(de-tab)
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93717 13f79535-47bb-0310-9956-ffa450edef68
2002-03-05 20:43:24 +00:00
Greg Ames
4cdf0a67bb fix <Directory ~ blah> containers.
also, eradicate a few nefarious tabs which were found lurking in the vicinity.

Submitted by:  Rob Simonson <simo@us.ibm.com>
Reviewed by:   Greg Ames


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93711 13f79535-47bb-0310-9956-ffa450edef68
2002-03-05 15:46:21 +00:00
Ryan Bloom
349a0b17e4 Only insert net_filter once per request. Initialize the output
protocol filters.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93709 13f79535-47bb-0310-9956-ffa450edef68
2002-03-05 05:24:21 +00:00
Justin Erenkrantz
d3c07a160b Ensure that net_time filter isn't added on subreqs - we assume that it is
added on !r->main requests.  This led to infinite loop/SEGV when dealing
with anything that created a subreq.

(I don't think core_create_req is a good place for adding this filter.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93694 13f79535-47bb-0310-9956-ffa450edef68
2002-03-04 09:20:03 +00:00
Ryan Bloom
633f3112fe Classify some of the input filters as the correct types. Previous to
this patch, the type wasn't too important, because all filters were
put on the same list.  After this patch, the filter type is very important,
because there are three different types of filters, and they are all treated
differently, namely:

CONNECTION:	Filters of this type are valid for the lifetime of this
		connection.
PROTOCOL:	Filters of this type are valid for the lifetime of this
		request from the point of view of the client, this means
		that the request is valid from the time that the request
		is sent until the time that the response is received.
CONTENT:	Filters of this type are valid for the time that this
		content is used to satisfy a request.  For simple requests,
		this is identical to PROTOCOL, but internal redirects
		and sub-requests can change the content without ending
		the request.

It is important to realize that the three major types above are actually
broken down into smaller groups in the code, to ensure that the ordering
of filters is always correct.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93688 13f79535-47bb-0310-9956-ffa450edef68
2002-03-03 22:34:55 +00:00
Justin Erenkrantz
0e17f7f2fa Fix segfault if content_type is NULL.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93570 13f79535-47bb-0310-9956-ffa450edef68
2002-02-26 04:04:54 +00:00
Ryan Bloom
b98728f920 I learned about AP_MODE_EXHAUSTIVE while reading some of the new filter
code earlier today.  With this mode, the Perchild MPM can finally be
fixed to work with filters.  I have changed a comment in the core to make
it clear that this mode is required, but I have mentioned how dangerous
this mode is.  Also add a comment to STATUS about my plans.

Hopefully I'll have some time this week to hack through the MPM.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93565 13f79535-47bb-0310-9956-ffa450edef68
2002-02-25 06:54:40 +00:00
William A. Rowe Jr
0d146565b9 This code should be a noop today. But I did not feel comfortable about
reusing/recopying each bucket -after- inserting it into the brigade.
  Also, copying bucket c from b from a seemed obtuse.

  This patch creates the single bucket, makes a copy of it for each
  sendfile chunk we are about to add to the brigade, and finally consumes
  that initial bucket as the final file bucket of the brigade.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93534 13f79535-47bb-0310-9956-ffa450edef68
2002-02-21 17:20:26 +00:00