1
0
mirror of https://github.com/apache/httpd.git synced 2025-06-09 07:21:20 +03:00

145 Commits

Author SHA1 Message Date
Paul J. Reder
38d03c5274 *) Remove compile-time length limit on request strings. Length is
now enforced solely with the LimitRequestLine config directive.
    [Paul J. Reder]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102840 13f79535-47bb-0310-9956-ffa450edef68
2004-03-01 21:40:44 +00:00
André Malo
eeb57c17ad fix name of The Apache Software Foundation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102619 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:40:53 +00:00
André Malo
e88fcf3c64 fix copyright dates according to the first check in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102589 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 13:58: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
Joe Orton
d78bd01cc6 * server/protocol.c (ap_rgetline_core): Fix folding if header is
continued over more than two lines.

PR: 19405 (affects proxy only)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102414 13f79535-47bb-0310-9956-ffa450edef68
2004-01-26 21:09:12 +00:00
Joe Orton
f5aa5e9081 * server/protocol.c (ap_rgetline_core): Re-indent function after being
skewed by CAN-2003-0132 fix: no functional change.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102413 13f79535-47bb-0310-9956-ffa450edef68
2004-01-26 20:58:12 +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
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
Jeff Trawick
45384da23b tag the pools created for requests and subrequests
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101441 13f79535-47bb-0310-9956-ffa450edef68
2003-10-13 23:43:00 +00:00
Jeff Trawick
468445ace2 zap an incorrect comment that remained from 1.3 days
Submitted by:	Aryeh Katz
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101211 13f79535-47bb-0310-9956-ffa450edef68
2003-09-10 12:12:18 +00:00
Jeff Trawick
ad2c145ec1 minor style changes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100562 13f79535-47bb-0310-9956-ffa450edef68
2003-07-12 13:03:39 +00:00
Joe Orton
b03404a6cb Update comment after removal of tmp_headers in r1.132.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100550 13f79535-47bb-0310-9956-ffa450edef68
2003-07-11 11:00:38 +00:00
Paul J. Reder
0cab3cd57a Update the header token parsing code to allow LWS between the token word
and the ':' seperator.  [PR 16520]
[submitted: Kris Verbeeck <kris.verbeeck@advalvas.be> and
            Nicel KM <mnicel@yahoo.com>]
[Reviewed: <coad@measurement-factory.com> and
           Paul J. Reder]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100492 13f79535-47bb-0310-9956-ffa450edef68
2003-07-08 21:21:13 +00:00
Brian Pane
cb820d48b8 Eliminate creation of a temporary table in ap_get_mime_headers_core()
Submitted by:	Joe Schaefer <joe+gmane@sunstarsys.com>
Reviewed by:	Brian Pane


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100334 13f79535-47bb-0310-9956-ffa450edef68
2003-06-22 22:08:53 +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
Brian Pane
68bf0bebe1 Simplify and shorten the code path for scanning request headers
Reviewed by:	Greg Ames, Bill Rowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99109 13f79535-47bb-0310-9956-ffa450edef68
2003-03-29 16:32:22 +00:00
Greg Ames
a38bd025fc ap_rgetline_core: set the number of bytes read & copied into the caller's
buffer when returning APR_ENOSPC.  This prevents seg faults in
ap_get_mime_headers_core in an error path which handles headers that are too
long.

Submitted by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99079 13f79535-47bb-0310-9956-ffa450edef68
2003-03-27 20:34:56 +00:00
Greg Ames
335a2bffee ap_get_mime_headers_core: allocate space for the trailing null when there
are folded headers. PR 18170 [Peter Mayne <PeterMayne@SPAM_SUX.ap.spherion.com>]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99057 13f79535-47bb-0310-9956-ffa450edef68
2003-03-24 16:39:25 +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
Greg Ames
f7befb0703 ap_get_mime_headers: combine some error paths to remove a conditional
branch from the mainline path.

It might be worthwhile to move all the getline error handling into a
separate function and be a little more i-cache friendly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97879 13f79535-47bb-0310-9956-ffa450edef68
2002-12-11 22:30:37 +00:00
Greg Ames
2be5ade5dc ap_get_mime_headers: whoops - need to insure that we use a configured
field size limit if there is one


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97875 13f79535-47bb-0310-9956-ffa450edef68
2002-12-11 22:09:40 +00:00
Greg Ames
4c7042aa3e ap_get_mime_headers: tighten up the null termination of header line which is
too long.  getline can return a smaller length that what it actually read in
that case.

The check for len > limit_fieldsize isn't needed, but we do need to insure
that getline actually allocated a buffer (and set len) in the case where
the first socket input buffer is already bigger than the limit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97863 13f79535-47bb-0310-9956-ffa450edef68
2002-12-11 21:03:58 +00:00
Greg Ames
fab2e40c2e prevent a potential seg fault in ap_escape_html if a header field is too
long.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97832 13f79535-47bb-0310-9956-ffa450edef68
2002-12-10 02:56:26 +00:00
Justin Erenkrantz
eaa472517d Move the check of the Expect request header field after the hook
for ap_post_read_request, since that is the only opportunity for
modules to handle Expect extensions.

Obtained from: apache-1.3


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97765 13f79535-47bb-0310-9956-ffa450edef68
2002-12-03 08:38:45 +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
Jeff Trawick
90231d37d6 when the connection drops, c->aborted is set but generally
ap_pass_brigade returns APR_SUCCESS

content-length needs to be alert to c->aborted so that it
doesn't keep trying to pass brigades down (otherwise, you get
errors writing to the network over and over and over and ...)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97363 13f79535-47bb-0310-9956-ffa450edef68
2002-10-31 11:39:36 +00:00
Jeff Trawick
e8402764fa Ensure that output already available is flushed to the network
when the content-length filter realizes that no new output will
be available for a while.  This helps some streaming CGIs as
well as some other dynamically-generated content.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97054 13f79535-47bb-0310-9956-ffa450edef68
2002-10-02 13:41:45 +00:00
Greg Stein
491919f718 Minor simplification... The can_send_content_length variable is
redundant with ctx->data_sent.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96971 13f79535-47bb-0310-9956-ffa450edef68
2002-09-25 01:51:13 +00:00
Jim Jagielski
6453fb2a05 The protocol version (eg: HTTP/1.1) in the request line parsing
is now case insensitive. Before, 'http/1.1' would silently be forced
to HTTP/1.0


PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96857 13f79535-47bb-0310-9956-ffa450edef68
2002-09-17 01:14:57 +00:00
Brian Pane
2c3170ce19 Changed the content-length filter to allow streaming delivery
of content to clients

With this new code, the C-L filter will compute a content-length
if there's an EOS in the first brigade passed to it.  For normal
static file requests, the response header will still include a C-L.
If there's no EOS in the first brigade passed to the C-L filter,
the filter will give up on setting the C-L header, in favor of
passing the data on to the next filter in a timely manner.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96557 13f79535-47bb-0310-9956-ffa450edef68
2002-08-28 18:37:48 +00:00
Greg Ames
65b5ceef11 fix weird things that happen with canned error messages due to using two
different request_recs after an ErrorDocument internal redirect failure.
examples: wrong Content-Type, garbled output from ebcdic servers due to
double charset translation


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96364 13f79535-47bb-0310-9956-ffa450edef68
2002-08-13 14:27:39 +00:00
Jeff Trawick
9437341232 add notes about a portability problem -- formatting apr_time_t
in hex


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96094 13f79535-47bb-0310-9956-ffa450edef68
2002-07-17 13:50:26 +00:00
Greg Ames
fc5a1debc7 fix folding when the continuation charater is a blank
Reported by:	one of Jeff T's regression test cases


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95975 13f79535-47bb-0310-9956-ffa450edef68
2002-07-08 17:36:41 +00:00
Jeff Trawick
f410fb3f9e silence an unhelpful gcc warning
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95971 13f79535-47bb-0310-9956-ffa450edef68
2002-07-08 12:58:16 +00:00
Brian Pane
5a02911204 Eliminated the use of AP_MODE_SPECULATIVE brigade reads to check
for request header continuation lines.  Instead, ap_get_mime_headers_core()
now sets aside each line of input until it sees the next line.  If the
next line starts with a tab, it is appended to the previous one; otherwise,
the previous line is added to the request headers table.

This reduces the number of temporary buckets that must be created
and destroyed to read in a request.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95964 13f79535-47bb-0310-9956-ffa450edef68
2002-07-06 01:53:37 +00:00
Brian Pane
708e1d6117 Re-use the same temp brigade to read all lines of a request header,
to avoid the overhead of brigade creation and deletion.  (This produced
a 5% reduction in the total CPU usage of a minimalist httpd configuration:
<JHEPKCEMGPKFFDHHDDKDMELFEKAA.bill@wstoddard.com>)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95956 13f79535-47bb-0310-9956-ffa450edef68
2002-07-04 17:05:25 +00:00
Cliff Woolley
73222b7255 Fix C-L filter non-blocking-mode brokenness. It was failing to ever
read from pipe/socket buckets again if it got APR_EAGAIN from them
due to its use of APR_BRIGADE_FOREACH.

Submitted by: the gang on IRC


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95946 13f79535-47bb-0310-9956-ffa450edef68
2002-07-02 23:51:21 +00:00
Brian Pane
5cc9b76282 Optimization for ap_rgetline_core(): When "folding" mode is enabled,
clear and re-use the temporary brigade rather than destroying it
and creating a new one


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95920 13f79535-47bb-0310-9956-ffa450edef68
2002-07-01 05:05:51 +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
b9850574f2 ap_finalize_sub_req_protocol() shouldn't send an EOS bucket if
one was already sent.

mod_ext_filter performs some one-time processing when it sees EOS.
When it saw EOS more than once and a subsequent attempt to close a
file failed, it issued the log message described in PR 9644.

PR:      9644


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95595 13f79535-47bb-0310-9956-ffa450edef68
2002-06-10 18:51:38 +00:00
Ryan Bloom
a90a9ba2be Call ap_discard_request_body from ap_finalize_request. Remove the call
from all other modules that do not use it to determine the response for
the request.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95576 13f79535-47bb-0310-9956-ffa450edef68
2002-06-07 22:31:34 +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
0f622df169 Start with a larger buffer size in ap_rgetline_core() to avoid
having to grow the buffer so often


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95053 13f79535-47bb-0310-9956-ffa450edef68
2002-05-13 06:45:07 +00:00
Brian Pane
94c67d067d Optimization: modified the power-of-two allocator in ap_rgetline_core()
so that it converges on the new buffer size in a single iteration.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95052 13f79535-47bb-0310-9956-ffa450edef68
2002-05-13 06:16:31 +00:00
Brian Pane
7dd968bb3e Fixed missing null-termination of ap_make_content_type() patterns list
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95047 13f79535-47bb-0310-9956-ffa450edef68
2002-05-12 16:55:41 +00:00
Brian Pane
3cf16ad4c7 Optimization: Replaced apr_strcat() with apr_strcatv() in
ap_make_content_type()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95041 13f79535-47bb-0310-9956-ffa450edef68
2002-05-12 00:57:33 +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
Cliff Woolley
f37d50cd71 cleanup old-school backward uses of APR_BRIGADE_CONCAT to use
APR_BRIGADE_PREPEND instead, plus optimize away a bunch of repetitive
brigade destructions/creations by hanging onto ctx->saved even after
we empty it out.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94952 13f79535-47bb-0310-9956-ffa450edef68
2002-05-06 09:11:50 +00:00
Justin Erenkrantz
f8ead96f43 Simplify this little chunk of code since r is set to f->r earlier.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94831 13f79535-47bb-0310-9956-ffa450edef68
2002-04-28 06:24:53 +00:00