1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-05 16:55:50 +03:00

258 Commits

Author SHA1 Message Date
Graham Leggett
2af2fa44ad 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@1214003 13f79535-47bb-0310-9956-ffa450edef68
2011-12-14 00:31:51 +00:00
Stefan Fritsch
92e366007c Add lots of unique tags to error log messages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:02:04 +00:00
Graham Leggett
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
Graham Leggett
4ee7eea4cf Introduce a per request version of the remote IP address, which can be
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
2011-11-22 13:10:39 +00:00
Stefan Fritsch
2bffeda10b Downgrade some more error messages about broken client behavior to level
info.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204630 13f79535-47bb-0310-9956-ffa450edef68
2011-11-21 18:16:01 +00:00
Stefan Fritsch
40ac38ff05 Remove MPM-private stuff from conn_state_t
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204104 13f79535-47bb-0310-9956-ffa450edef68
2011-11-19 23:35:46 +00:00
Stefan Fritsch
4db71797ea Fix 3xx responses with local URLs as ErrorDocument
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1187985 13f79535-47bb-0310-9956-ffa450edef68
2011-10-23 22:07:50 +00:00
Jim Jagielski
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
Jeff Trawick
4598f1a7d4 fix some grammar mistakes, mostly in comments
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1080821 13f79535-47bb-0310-9956-ffa450edef68
2011-03-12 00:35:39 +00:00
Eric Covener
676cc45e8b PR50349: Honor 'AcceptPathInfo OFF' during internal redirects,
such as per-directory mod_rewrite substitutions.   This would be left floating 
around in the request_rec with a pcalloc'ed value, so the core fixup
hook thought some module had overridden it.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1043023 13f79535-47bb-0310-9956-ffa450edef68
2010-12-07 13:06:22 +00:00
Stefan Fritsch
b7936c98ba More trace logging
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@956374 13f79535-47bb-0310-9956-ffa450edef68
2010-06-20 16:17:23 +00:00
Joe Orton
e446077b99 * modules/http/http_request.c (internal_internal_redirect): For a
subrequest, preserve any filters in the output filter chain which
  were not specific to the subrequest across the redirect (where
  f->r does not point to the subreq's request_rec).

PR: 17629




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@952828 13f79535-47bb-0310-9956-ffa450edef68
2010-06-08 21:17:48 +00:00
Stefan Fritsch
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
William A. Rowe Jr
4c8baf8db2 Add ap_process_request_after_handler to the exported list for mod_serf
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@906606 13f79535-47bb-0310-9956-ffa450edef68
2010-02-04 18:50:05 +00:00
William A. Rowe Jr
1a3219797b Because the redirect-request survives logging, we don't have the
same exposure as subrequests, and this change would have doubled
the headers.  Revert this bit of the headers_in 'consistification'

Noted by rpluem.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@901589 13f79535-47bb-0310-9956-ffa450edef68
2010-01-21 08:11:00 +00:00
William A. Rowe Jr
115c1e496d Correctly align the behavior of headers_in to be consistent with the
treatment of headers_out, resolving PR 48359 by keeping subrequest
scope changes out of the main request headers.  This ensures that all
requests-without-bodies behave as the requests-with-bodies code has.

Mitre: CVE-2010-0434


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@901578 13f79535-47bb-0310-9956-ffa450edef68
2010-01-21 07:19:41 +00:00
Nick Kew
e4eef0cf74 We shouldn't need to create r->allowed_methods twice!
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@897570 13f79535-47bb-0310-9956-ffa450edef68
2010-01-09 22:34:51 +00:00
Nick Kew
95d288c212 Preserve port over internal redirection
PR#35999
A four-year-old buglet!


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@807015 13f79535-47bb-0310-9956-ffa450edef68
2009-08-23 20:30:47 +00:00
Roy T. Fielding
7ff9306de2 only call mutex functions if APR_HAS_THREADS
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@745338 13f79535-47bb-0310-9956-ffa450edef68
2009-02-18 00:59:39 +00:00
Jim Jagielski
6777364613 Hopefully the final fix for the subreq/filter issue. The
prob was that we at this point could still have some
stale and incorrect refs when we adjusted the f-stack.
So move the update earlier so when we adjust, we're
affecting r. RŸdiger and Jim pretty much
simultaneously :)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@725077 13f79535-47bb-0310-9956-ffa450edef68
2008-12-10 13:01:31 +00:00
Jim Jagielski
a36484e4e0 reset chain if we need to...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@724805 13f79535-47bb-0310-9956-ffa450edef68
2008-12-09 18:19:20 +00:00
Ruediger Pluem
206fa0e2f4 * Correctly remove the SUBREQ_CORE filter from the filter chain if we do an
internal fast redirect and if the new redirected request is NO subrequest.
  This fixes at least one of the possible subtle issues mentioned in the
  comment to r620133.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@724515 13f79535-47bb-0310-9956-ffa450edef68
2008-12-08 22:18:27 +00:00
Paul Querna
f47b6f394e Import the core parts of the DTrace patch. This is a modified and updated
version of what was submited by Theo before:
 <http://mail-archives.apache.org/mod_mbox/httpd-dev/200805.mbox/%3C6AFBCFE8-4CCA-4A02-8A43-F9170689695D@omniti.com%3E>

Note, this does not hook it up into the build system at this time, because
the original patch was a little too creative there.

Submitted By: Theo Schlossnagle <jesus omniti.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@723565 13f79535-47bb-0310-9956-ffa450edef68
2008-12-05 03:34:52 +00:00
Ruediger Pluem
cd505682e9 * Avoid sending no answer at all if a custom error page causes an
AP_FILTER_ERROR.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@722213 13f79535-47bb-0310-9956-ffa450edef68
2008-12-01 20:27:27 +00:00
Paul Querna
92e9540e3b * modules/http/http_request.c
(ap_process_async_request): Fix warning: 'return' with a value, in function 
      returning void


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@708821 13f79535-47bb-0310-9956-ffa450edef68
2008-10-29 08:18:45 +00:00
Paul Querna
767cc30c02 Introduce Suspendable Requests to the Event MPM.
Using this basic framework, you can return SUSPENDED from an HTTP Handler,
and then register a callback that is invoked by the MPM at a later time.

This initial version only supports _timers_ as callbacks, but in the future I
would like to add things like wait for socket activity, on a socket specified by
the handler.

Once in a callback, It is then the responsibility of the callback fucntion 
to finish the HTTP Request handling, but this alows you to do cool things like 
a fully async proxy, COMET support, or even rate limiting.

To prove I'm not insane, I've inlcuded an example module, mod_dialup.

You can configure it like this:
<Location "/docs">
  ModemStandard "V.32"
</Location>

And for static files inside that path, you will be rate limited to V.32 speeds, 
aka 9.6 kilobits/second.

Does anyone besides Rüdiger read commit emails :-) ?

I know there are likely huge problems with this, but I would like to see how far
we can push the Event MPM, figure out what to do better, if there is anything, 
and then really dive into the 3.0 development before ApacheCon.

* server/mpm/experimental/event/fdqueue.h:
    (timer_event_t): New structure to hold timer events and callback functions.
    
* server/mpm/experimental/event/fdqueue.c
    (ap_queue_empty): Modify to also look at Timer Ring.

    (ap_queue_init): Initialize Timer Ring.

    (ap_queue_push_timer): New function, pushes a timer event into the queue.

    (ap_queue_pop_something): Renamed function, returns a timer event or
        a socket/pool for a worker thread to run.


* server/mpm/experimental/event/event.c
    (process_socket): If the connection is in SUSPENDED state, don't force it
        into linger mode yet, the callback will have to take care of that.

    (push_timer2worker): New shortcut function, pushes timer event into queue
        for a worker to run.

    (timer_free_ring): New global data structure to recycle memory used by 
        timer events.

    (timer_ring): New global data structure to hold active timer events.

    (g_timer_ring_mtx): Thread mutex to protect timer event data structures.

    (ap_mpm_register_timed_callback): New Function, registers a callback to be
        invoked by the MPM at a later time.

    (listener_thread): Calculate our wakeup time based on the upcoming Event 
        Queue, and after pollset_poll runs, push any Timers that have passed
        onto worker threads to run.
    
    (worker_thread): Call new queue pop method, and if the Timer Event is 
        non-null, invoke the callback.  Once the callback is done, push the
        structure onto the timer_free_ring, to be recycled.

    (child_main): Initialize new mutex and ring structures.


* server/config.c
    (ap_invoke_handler): Allow SUSPENDED aa valid return code from handlers.


* modules/http/http_core.c
    (ap_process_http_async_connection): Don't close the connection when in 
        SUSPENDED state.


* modules/http/http_request.c
    (ap_process_request_after_handler): New function, body pulled from the old,
        ap_process_async_request.  Split to let handlers invoke this so they 
        don't need to know all of the details of finishing a request.

    (ap_process_async_request): If the handler returns SUSPENDED, don't do
        anything but return.


* include/ap_mmn.h: Bump MMN.


* include/ap_mpm.h
    (ap_mpm_register_timed_callback): New function.


* include/httpd.h:
    (SUSPENDED): New return code for handlers.
    (request_rec::invoke_mtx): New mutex to protect callback invokcations
        from being run before the original handler finishes running.
    (conn_state_e): Add a suspended state.


* include/http_request.h
    (ap_process_request_after_handler): New function to make it easier for 
        handlers to finish the HTTP Request.


* modules/test/config.m4: Add mod_dialup to build.


* modules/test/mod_dialup.c: New rate limiting module, requires the Event MPM 
    to work.




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@697357 13f79535-47bb-0310-9956-ffa450edef68
2008-09-20 11:58:08 +00:00
Paul Querna
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
Ruediger Pluem
63351a529b - In AP_MODE_SPECULATIVE ap_core_input_filter returns APR_SUCCESS and an empty
brigade in the case that a non blocking read from the socket returned
  APR_EAGAIN. So getting an empty brigade also shows that no data is present
  in the input filter.
  While this reduces the number of false positives for "real data" in the input
  filter the behaviour is not as good as before 533820 because if there are
  only CRLF's in the input filter we do not flush, but we should. To fix this
  it seems that a simulation of AP_MODE_EATCRLF is needed inside of
  check_pipeline.
- Destroy brigade bb at the end of the function.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@535879 13f79535-47bb-0310-9956-ffa450edef68
2007-05-07 14:20:09 +00:00
Greg Ames
2c91e92953 check_pipeline: use AP_MODE_SPECULATIVE to check for data in the input filters
to accomodate mod_ssl's input filter.  AP_MODE_EATCRLF is essentially a no-op
in that filter.

this fixes missing imbedded graphics etc when using the Event MPM with mod_ssl
with HTTP pipelining enabled in the browser.  the pipelined requests after the
first were never read from mod_ssl's input filter.  it might reduce unneeded 
flushes with other MPMs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@533820 13f79535-47bb-0310-9956-ffa450edef68
2007-04-30 18:16:06 +00:00
Garrett Rooney
49291c1444 Follow up to r451287, use APR_STATUS_IS_TIMEUP instead of comparing
against APR_TIMEUP directly.

* modules/http/http_request.c
  (ap_process_request): Use APR_STATUS_IS_TIMEUP.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@451288 13f79535-47bb-0310-9956-ffa450edef68
2006-09-29 13:44:45 +00:00
Ruediger Pluem
70cf75f609 * Notice a timeout as an error message. This might be valuable for detecting
clients with broken network connections or possible DoS attacks.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@451287 13f79535-47bb-0310-9956-ffa450edef68
2006-09-29 13:39:53 +00:00
Roy T. Fielding
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
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
Nick Kew
24c5cde238 PR 36090
Fix recursive ErrorDocument handling


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@354118 13f79535-47bb-0310-9956-ffa450edef68
2005-12-05 18:22:29 +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
Brian Pane
f0538ad65c Allocate the brigade containing the EOR bucket from the connection
pool, rather than the request pool, because the core output filter
may need to reference the brigade immediately after deleting the
EOR bucket (and thus the request pool).  This fixes a coredump
encountered when running t/TEST on an httpd compiled with
"--enable-pool-debug."


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@329484 13f79535-47bb-0310-9956-ffa450edef68
2005-10-29 21:11:51 +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
André Malo
9c1115eb44 * modules/http/http_request.c
(ap_allow_methods): add missing va_end call


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@321500 13f79535-47bb-0310-9956-ffa450edef68
2005-10-15 21:37:38 +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
Jim Jagielski
9e6b472772 Keep track of time taken to process requests again.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@149550 13f79535-47bb-0310-9956-ffa450edef68
2005-02-02 19:32:18 +00:00
Paul Querna
95d5391b9f Compile Fix for Netware Port with CodeWarrior.
Noticed By: <normw@bocnet.com.au>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106072 13f79535-47bb-0310-9956-ffa450edef68
2004-11-21 05:53:38 +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
Justin Erenkrantz
c28dfa19f1 * modules/http/http_request.c (ap_internal_redirect): Call quick_handler
when we do an internal redirect to allow caching.  This allows mod_dir
  requests to be cached.

Reviewed by:	Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104446 13f79535-47bb-0310-9956-ffa450edef68
2004-08-02 17:12:32 +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
afc28afde4 internal_fast_redirect: take over important request_rec members
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102330 13f79535-47bb-0310-9956-ffa450edef68
2004-01-13 23:59:57 +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
Jeff Trawick
0c3c5b7145 Set the scoreboard state to indicate logging prior to running
logging hooks so that server-status will show 'L' for hung loggers
instead of 'W'.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101517 13f79535-47bb-0310-9956-ffa450edef68
2003-10-22 16:45:53 +00:00