1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

383 Commits

Author SHA1 Message Date
Colm MacCarthaigh
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
Jim Jagielski
d4f879aefa Morph the ap_http_broken_backend_filter() proxy "specific"
filter to a generic http error handling output filter.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@358022 13f79535-47bb-0310-9956-ffa450edef68
2005-12-20 15:50:37 +00:00
Ruediger Pluem
90089065b6 * Move code for broken backend detection out of core filter into a new http
protocol filter (ap_http_broken_backend_filter) that is only run in the
  proxy case.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@357519 13f79535-47bb-0310-9956-ffa450edef68
2005-12-18 22:09:05 +00:00
Jim Jagielski
08c97ba290 No functional change: remove "internal" tab spacing/formatting.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@345053 13f79535-47bb-0310-9956-ffa450edef68
2005-11-16 16:31:25 +00:00
Jim Jagielski
5061d9fa92 No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:11:44 +00:00
Jim Jagielski
5d2fae4818 No functional change: simple detabbing of indented code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332305 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:05:51 +00:00
Brian Pane
5a653ac440 Moved the extended_status scoreboard update from ap_process_http_connection
to the EOR bucket destructor.  Also, added some defensive code and comments
regarding r->pool lifetime to ap_process_http_connection.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@329664 13f79535-47bb-0310-9956-ffa450edef68
2005-10-30 22:55:35 +00:00
Brian Pane
cb0e5db86f Async write completion for Event MPM
(backported from async-dev branch to 2.3 trunk)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@327945 13f79535-47bb-0310-9956-ffa450edef68
2005-10-24 03:33:14 +00:00
Brian Pane
158559eacb Redesign of request cleanup and logging to use End-Of-Request bucket
(backport from async-dev branch to 2.3 trunk)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@327925 13f79535-47bb-0310-9956-ffa450edef68
2005-10-24 02:39:49 +00:00
Brian Pane
4db6998015 Add new connection states for handler and write completion
(backport from async-dev branch to 2.3 trunk)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@327870 13f79535-47bb-0310-9956-ffa450edef68
2005-10-23 22:20:59 +00:00
William A. Rowe Jr
7e2a5490d1 NET_TIME, as a standalone feature, was a horrid idea.
The core filter will NOT operate correctly across platforms 
  (even between Linux/Solaris) without setting up the conn->timeout,
  so always apply the timeout when establishing the core filter.

  The keep-alive-timeout is entirely an HTTP-ism, and needs to
  move to the http protocol handler.  Note #1; this isn't triggered
  in the event mpm, but the event mpm introspects s->keep_alive_timeout
  directly adding it to the pollset, so this is a non-sequitor.

  Finally, once the headers are read, the named virtual host may
  have a different (more/less permissive) timeout for the remainder
  of the request body.  This http-centric patch picks up that subtle
  detail and can switch to a named-vhost timeout.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@306495 13f79535-47bb-0310-9956-ffa450edef68
2005-10-06 01:29:42 +00:00
William A. Rowe Jr
e279db098e Spare us a wasted variable, csd is initialized null, acting
as the 'csd_set' indicator.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@300198 13f79535-47bb-0310-9956-ffa450edef68
2005-10-06 00:46:23 +00:00
Justin Erenkrantz
905cdf9f0b Update copyright year to 2005 and standardize on current copyright owner line.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
2005-02-04 20:28:49 +00:00
William A. Rowe Jr
d962fcfc8b FINALLY Correct ap_http_method()! It is NOT a method, it's a SCHEME!
Bumped mmn, and ap module cookie, for this function rename.

  It's not a deprecation, as ap_http_method would be a lovely function
  name sometime in the future: to determine what the function name implies.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123882 13f79535-47bb-0310-9956-ffa450edef68
2005-01-02 05:33:44 +00:00
Paul Querna
3afc45863a * Style fixes only. No functional changes. Remove two tabs. Fix an If. Split a String.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111719 13f79535-47bb-0310-9956-ffa450edef68
2004-12-13 16:13:06 +00:00
Joe Orton
671710004d * modules/http/mod_core.h: Prototype ap_http_chunk_filter.
* modules/http/chunk_filter.c (ap_http_chunk_filter): Rename from
chunk_filter.

* modules/http/http_core.c (chunk_filter): Remove the original copy.
(register_hooks): Register ap_http_chunk_filter.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@109497 13f79535-47bb-0310-9956-ffa450edef68
2004-12-02 13:25:12 +00:00
Greg Ames
b5e9415869 ap_process_http_async_connection (used by the Event MPM):
fix CLOSE_WAITs/leaked connections.  The logic to deal with ap_read_request
failures got lost when merging in the HTTP pipelining fix.  If ap_read_request
fails, the connection state should get set to CONN_STATE_LINGER so the MPM will
invoke lingering close.  Test case: client sends a Connection: keepalive header
then closes the connection before the keepalive timeout pops.

Also add a comment to make the pipelining flow more obvious.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106662 13f79535-47bb-0310-9956-ffa450edef68
2004-11-26 21:21:42 +00:00
Paul Querna
34959f29db The Event MPM.
Designed to minimize Apache's KeepAlive overhead.

This MPM depends on the current APR-trunk for new features added to 
the apr_pollset interface. Currently the underlying operating
system must support KQueue or EPoll.

Status:
  Should work as a drop in replacement for all non-ssl servers.
  SSL Requests that use HTTP 1.1 Pipelining do not currently work.

Testing:
  I have tested it with Linux 2.6, FreeBSD 5.2.1, and OS X 10.3.
  
Originally based on the patch by Greg Ames.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105919 13f79535-47bb-0310-9956-ffa450edef68
2004-11-20 02:52:36 +00:00
André Malo
a688f06b19 fix name of The Apache Software Foundation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102618 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:31:03 +00:00
André Malo
d0e05bada9 fix copyright dates according to the first check in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102565 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 12:07:22 +00:00
André Malo
4f02cb1e18 apply Apache License, Version 2.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
2004-02-06 22:58:42 +00:00
André Malo
fb07607180 update license to 2004.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
2004-01-01 13:26:26 +00:00
Cliff Woolley
aaf0424e2b get rid of _FOREACH
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101788 13f79535-47bb-0310-9956-ffa450edef68
2003-11-16 02:09:14 +00:00
Jeff Trawick
013339e87d fix some discrepancies between format strings and arguments,
resolving some warnings on 64-bit systems


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99374 13f79535-47bb-0310-9956-ffa450edef68
2003-04-15 22:47:58 +00:00
André Malo
742af25096 finished that boring job:
update license to 2003.

Happy New Year! ;-))


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
Jeff Trawick
8bc57d1e1e bucket length parameter is apr_size_t, which isn't always signed,
so be careful when comparing with the special value -1

Submitted by:	Allan Edwards <ake@us.ibm.com>
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97569 13f79535-47bb-0310-9956-ffa450edef68
2002-11-19 19:32:38 +00:00
William A. Rowe Jr
ed8fc9abae http occurances to update for apr_socket_opt_get/set
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96057 13f79535-47bb-0310-9956-ffa450edef68
2002-07-15 08:05:11 +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
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
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
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
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
Cliff Woolley
388bb6d20f Fix a segfault because ap_method_registry_init() was never called unless
ap_method_register() was called [ie, unless mod_dav was installed]

Reported by: Brian Pane


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94156 13f79535-47bb-0310-9956-ffa450edef68
2002-03-25 07:20:45 +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
Justin Erenkrantz
15584be90b Fix prototype and return value of http_create_request to match new hook
declaration.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93754 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 08:23:56 +00:00
Ryan Bloom
41a7e56b09 There is no reason to insert the protocol filters in the insert_filters
phase.  This moves us to inserting the filters in the create_request
phase.  This makes more sense, because now the protocol filters are attached
to the request as soon as possible.  Previously, some requests never
called the insert_filters phase, so they don't get the filters.  Think
redirects for reqeusts that never call insert_filters.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93750 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 05:02:53 +00:00
Ryan Bloom
c8965c1e94 Adding the same filters over and over again used to be okay, because
we would lose the extra filters.  Now, if a filter is added, it is run.
Unfortunately, this can cause an infinite loop, or it can cause request
headers to appear twice.  This commit removes two instances in the core
where we were inserting filters for a second and third time.  The bug
was that error responses were causing infinite loops.

This also removes the reset_filters function, which did the exact
same thing as add_required_filters.  The two functions were both called
in error conditions, which was part of what caused this bug.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93693 13f79535-47bb-0310-9956-ffa450edef68
2002-03-04 05:54:44 +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
Bill Stoddard
4168820850 This patch restores most of Ryan's patch (11/12/2001) to remove the
client_socket from the conn_rec.  Diffs from Ryan's patch include:

- rename the create_connection hook to install_transport_filters
- move the point of invocation of the hook till after the call to
  after ap_update_vhost_given_ip to enable the hook to use vhost
  config info in its decision making.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93087 13f79535-47bb-0310-9956-ffa450edef68
2002-01-29 19:02:04 +00:00
Brian Pane
15d2ad0f1a Replaced some more ap_add_output_filter() calls with
ap_add_output_filter_handle() for efficiency


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93051 13f79535-47bb-0310-9956-ffa450edef68
2002-01-27 19:12:56 +00:00
Bill Stoddard
327e4989d5 Remove the create_connection hook and put the client_socket back into the
conn_rec. The create_connection_hook has a design flaw that prevents it
from making decisions based on vhost information.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93050 13f79535-47bb-0310-9956-ffa450edef68
2002-01-27 12:52:08 +00:00
William A. Rowe Jr
30d1548be6 Fix a handful of AP_MODULE_DECLARE_DATA exports for .so modules.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92805 13f79535-47bb-0310-9956-ffa450edef68
2002-01-10 09:11:33 +00:00
Jeff Trawick
187e9ae3b9 Change core code to allow an MPM to set hard thread/server
limits at startup.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92512 13f79535-47bb-0310-9956-ffa450edef68
2001-12-18 13:48:54 +00:00
Bill Stoddard
6c942d45f4 Detabify the chunk filter. No function change.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92487 13f79535-47bb-0310-9956-ffa450edef68
2001-12-14 21:30:16 +00:00
Ryan Bloom
d70af2b3eb Fix the timeout logic that I broke last week. This adds a request
level filter that sets the timeout on the socket that is connected
to the client.

Thanks Greg Stein for seeing this bug.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92073 13f79535-47bb-0310-9956-ffa450edef68
2001-11-21 03:46:22 +00:00
Ryan Bloom
0c05b625ac Begin to abstract out the underlying transport layer.
The first step is to remove the socket from the conn_rec,
the server now lives in a context that is passed to the
core's input and output filters. This forces us to be very
careful when adding calls that use the socket directly,
because the socket isn't available in most locations.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91887 13f79535-47bb-0310-9956-ffa450edef68
2001-11-12 23:49:08 +00:00
Justin Erenkrantz
40304cb1ee Remove unnecessary initialization and add a comment about chunk_hdr's
scope.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91209 13f79535-47bb-0310-9956-ffa450edef68
2001-09-30 04:17:16 +00:00
Justin Erenkrantz
66ee5533d3 Remove the lameo create_req hack and delay the addition of the HTTP_IN
filter until after we have read the headers.  This eliminates the status
hack that was in http_protocol.c and makes it all around better.

server/protocol.c now directly adds HTTP_IN filter - should we create a
specific hook for this?  (Could we do this as a post_read_request hook?)
I'm not terribly sure, but let's move it down to the lowest possible
place in ap_read_request.  We can change this detail later as we see fit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91192 13f79535-47bb-0310-9956-ffa450edef68
2001-09-29 08:48:59 +00:00