Commit Graph

207 Commits

Author SHA1 Message Date
c0a0d085b4 no declarations after statements.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@821599 13f79535-47bb-0310-9956-ffa450edef68
2009-10-04 20:18:51 +00:00
aa726d199a cleanup brigade before reusing it
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@821481 13f79535-47bb-0310-9956-ffa450edef68
2009-10-04 09:00:26 +00:00
fbdde88b36 core, mod_deflate, mod_sed: Reduce memory usage by reusing bucket
brigades in several places


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@821471 13f79535-47bb-0310-9956-ffa450edef68
2009-10-04 07:37:28 +00:00
b5532dce62 core: Treat timeout reading request as 408 error, not 400.
Log 408 errors in access log as was done in Apache 1.3.x.

PR: 39785
Submitted by: Nobutaka Mantani, Stefan Fritsch
Reviewed and added to by: Dan Poirier


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@820760 13f79535-47bb-0310-9956-ffa450edef68
2009-10-01 19:28:36 +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
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
a348f7b78b the CRLF following 100 Continue needs to be sent as ASCII on EBCDIC
boxes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@752546 13f79535-47bb-0310-9956-ffa450edef68
2009-03-11 18:05:20 +00:00
421ee8b008 Disabled DefaultType directive and removed ap_default_type()
from core.  We now exclude Content-Type from responses for which
a media type has not been configured via mime.types, AddType,
ForceType, or some other mechanism.  MMN major bump to NZ time.

PR: 13986



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@739382 13f79535-47bb-0310-9956-ffa450edef68
2009-01-30 19:12:51 +00:00
1fbdabf8f4 simplifications per niq's review comments
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@733218 13f79535-47bb-0310-9956-ffa450edef68
2009-01-10 01:30:29 +00:00
57cbab5315 EBCDIC fix for ap_send_interim_response()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@733134 13f79535-47bb-0310-9956-ffa450edef68
2009-01-09 19:48:43 +00:00
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
d9c0b7e070 * Don't send 100-Continue when there was no Expect: 100-continue in the
request headers.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@664150 13f79535-47bb-0310-9956-ffa450edef68
2008-06-06 21:56:13 +00:00
1d1c483317 core, mod_proxy: If a kept_body is present, it becomes safe for
subrequests to support message bodies. Make sure that safety
checks within the core and within the proxy are not triggered
when kept_body is present. This makes it possible to embed
proxied POST requests within mod_include.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@654968 13f79535-47bb-0310-9956-ffa450edef68
2008-05-09 22:40:01 +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
754135d1f2 * Do not set filter context brigade to NULL (and thus need to recreate it each
time) but empty it (via APR_BRIGADE_PREPEND) and reuse it. 

Submitted by: Stefan Fritsch <sf sfritsch.de>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@603227 13f79535-47bb-0310-9956-ffa450edef68
2007-12-11 12:48:39 +00:00
d5530bc6f5 Alternate fix... profiling indicates that the string
termination is completely unneeded and superflous. In
which case, the original allocation size is sufficient
since nothing external worries about a NULL nor
looks for it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@602491 13f79535-47bb-0310-9956-ffa450edef68
2007-12-08 16:10:40 +00:00
6c0689eeae Prevent 1-byte overflow on 8192 boundary (see PR 43310)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@589461 13f79535-47bb-0310-9956-ffa450edef68
2007-10-29 01:25:16 +00:00
c94140fb01 Add option not to send&clear response headers in ap_send_interim_response.
We'll need this option to fix PR#43711, and ap_send_interim_response
is fortunately too new an API to have made it into anything stable.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@588806 13f79535-47bb-0310-9956-ffa450edef68
2007-10-26 23:56:06 +00:00
3d1465d445 Introduce ap_send_interim_response function and API, for interim
(HTTP 1xx) responses sent by an application or backend.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@582630 13f79535-47bb-0310-9956-ffa450edef68
2007-10-07 13:41:50 +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
c13f8dd6eb * server/core.c (default_handler): Use apr_brigade_insert_file() to
append the file to the brigade.

* server/protocol.c (ap_send_fd),
modules/proxy/mod_proxy_http.c (spool_reqbody_cl), 
modules/cache/mod_mem_cache.c (recall_body),
modules/cache/mod_disk_cache.c (recall_body),
modules/mappers/mod_negotiation.c (handle_map_file),
modules/generators/mod_asis.c (asis_handler),
modules/dav/fs/repos.c [DEBUG_GET_HANDLER] (dav_fs_deliver),
modules/arch/win32/mod_isapi.c (ServerSupportFunction): Likewise.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@414238 13f79535-47bb-0310-9956-ffa450edef68
2006-06-14 13:16:29 +00:00
8cca196973 * Adjust comment as per niq's proposal in r395166 and as already adjusted by
colm in the backport to 2.0.x (r395197).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395381 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 20:07:22 +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
4d1b38642d * Initialize last_char as otherwise a random value will be compared
against APR_ASCII_LF at the end of the loop if bb only contains an
  EOS bucket.

PR: 39282
Submitted by: Davi Arnaut <davi haxent.com.br>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@394070 13f79535-47bb-0310-9956-ffa450edef68
2006-04-14 12:17:54 +00:00
df91b29fd7 * Rollback r393037 as this was vetoed by wrowe. Details see
http://mail-archives.apache.org/mod_mbox/httpd-dev/200604.mbox/%3c443ABE65.1060603@rowe-clan.net%3e


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@393087 13f79535-47bb-0310-9956-ffa450edef68
2006-04-10 22:07:02 +00:00
d6f4ab7bfa * Prevent r->parsed_uri.path from being NULL as this can cause segmentation
faults e.g. in mod_cache. Set it to "/" in this case.

PR: 39259
Submitted by: Davi Arnaut <davi haxent.com.br>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@393037 13f79535-47bb-0310-9956-ffa450edef68
2006-04-10 19:59:33 +00:00
761ef9ee17 Revert the refactoring of the request read code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@381679 13f79535-47bb-0310-9956-ffa450edef68
2006-02-28 15:49:24 +00:00
4befe87504 * Improve fix for PR38123. This fixes PR38123 and PR37790 (whose fix has been
already backported) by inserting the HTTP_IN filter uncondionally before
  we call ap_send_error_response or ap_die. This ensures that
  ap_discard_request_body called by ap_die and by ap_send_error_response works
  correctly on status codes that do not cause the connection to be dropped and
  in situations where the connection should be kept alive.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@371132 13f79535-47bb-0310-9956-ffa450edef68
2006-01-21 23:22:23 +00:00
44c8981aac * Fix PR38123 by adding the HTTP_IN filter also in the case of an invalid
expect header.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@370172 13f79535-47bb-0310-9956-ffa450edef68
2006-01-18 16:04:13 +00:00
144837a6a6 An unambigous cast, if limit is <0 it's unlimited.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@368443 13f79535-47bb-0310-9956-ffa450edef68
2006-01-12 19:14:28 +00:00
0aece3ad6c Refactoring of ap_read_request() to store partial request state
in the request rec.  The point of this is to allow asynchronous
MPMs do do nonblocking reads of requests.  (Backported from the
async-read-dev branch)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@360461 13f79535-47bb-0310-9956-ffa450edef68
2005-12-31 23:45:11 +00:00
2de4e93f2b * server/protocol.c (ap_old_write_filter): Use NULL for the NULL
pointer not 0.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@357170 13f79535-47bb-0310-9956-ffa450edef68
2005-12-16 14:48:22 +00:00
78513efe12 Fix for Bug 37790 (hangs on error return from post_read_request)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@354085 13f79535-47bb-0310-9956-ffa450edef68
2005-12-05 15:30:15 +00:00
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
374a607001 keep the proxied Content-Length header for a HEAD response. PR 18757
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@327008 13f79535-47bb-0310-9956-ffa450edef68
2005-10-20 21:42:50 +00:00
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
62d58df5ca Pay close attention to core_create_req() ... and note
that not one other member of the r->vars is initialized
  herein.  Move this initialization elsewhere.

  (If this is the 'default' - it really aught to be the
  zero value, for that matter).



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@295141 13f79535-47bb-0310-9956-ffa450edef68
2005-10-05 23:37:53 +00:00
ba2f28e54d * server/protocol.c (ap_read_request): Remove the Content-Length
header if any Transfer-Encoding header is present, regardless of
value.

Reviewed by: Paul Querna, Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@193122 13f79535-47bb-0310-9956-ffa450edef68
2005-06-23 09:36:16 +00:00
383bae1ebc if Transfer-Encoding is not "identity" ignore Content-Length.
otherwise ajp-proxy hangs when Transfer-Encoding is "chunked".


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@191175 13f79535-47bb-0310-9956-ffa450edef68
2005-06-17 16:47:43 +00:00
357706a870 If a request contains both a T-E and C-L, remove the C-L, stopping some HTTP Request Smuggling attacks exploited when using HTTPD as a forward or reverse proxy.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@191005 13f79535-47bb-0310-9956-ffa450edef68
2005-06-16 21:34:08 +00:00
b90c24d243 * server/protocol.c (read_request_line): Revert addition of error
message which triggers every time dummy_connection() is used to wake
up a child.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@170433 13f79535-47bb-0310-9956-ffa450edef68
2005-05-16 19:36:04 +00:00
7ae218a5bf Support the suppress-error-charset setting, as with Apache 1.3.x.
With Apache 1.3.x, it is a bit simpler as the request does
not go through ap_make_content_type().

Modules can set custom error responses but not be able to
set the charset, so they have to code the charset in the
html.  Thus, it is useful to preserve 1.3.x behavior exactly.

PR: 26467


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@170354 13f79535-47bb-0310-9956-ffa450edef68
2005-05-16 10:41:42 +00:00
6eabfd6c6a use a more general but slightly slower test for a body.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160573 13f79535-47bb-0310-9956-ffa450edef68
2005-04-08 18:07:33 +00:00
2b3ad91040 clone_headers_no_body: remove all entity headers in addition to the
Transfer-Encoding header when creating a GET subrequest



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@159410 13f79535-47bb-0310-9956-ffa450edef68
2005-03-29 18:24:46 +00:00
235fd33d8f don't propagate input headers describing a body to a subrequest. this can cause a
back end server to hang in a read for a body which no longer exists.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@158798 13f79535-47bb-0310-9956-ffa450edef68
2005-03-23 16:36:45 +00:00
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
6b27462b2f limit_req_fieldsize is signed, correct a signedness error using
a cast since it's not possible to have a negative limit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@124283 13f79535-47bb-0310-9956-ffa450edef68
2005-01-05 22:21:56 +00:00
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
694a529c09 Revert patch r104923. This patch doesn't actually fix bug 18757 and
breaks TLS upgrade functionality.  Also, removing the content length for
HEAD requests is being handled in ap_http_header_filter().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@110141 13f79535-47bb-0310-9956-ffa450edef68
2004-12-07 19:04:22 +00:00
4ddf48af17 Fix for memory consumption DoS, CVE CAN-2004-0942:
* server/protocol.c (ap_rgetline_core): Don't trim trailing whitespace
from the buffer here.
(ap_get_mime_headers_core): Trim trailing whitespace here, after
reading a complete field including continuation lines.  Also simplify
code to remove whitespace between field-name and colon.

Reviewed by: Andr�� Malo, Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105680 13f79535-47bb-0310-9956-ffa450edef68
2004-11-04 14:50:31 +00:00