1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-06 16:49:32 +03:00
Commit Graph

482 Commits

Author SHA1 Message Date
Nick Kew
d37a21d981 Fix Bug 18388 (Set-Cookie in 304)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104924 13f79535-47bb-0310-9956-ffa450edef68
2004-09-01 13:37:07 +00:00
André Malo
9266375e50 parse byteranges correctly using the new apr_strtoff function
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103765 13f79535-47bb-0310-9956-ffa450edef68
2004-05-25 19:09:45 +00:00
Joe Orton
2c37f8ffc7 * modules/http/http_protocol.c (ap_setup_client_block,
ap_http_filter): Use new apr_strtoff() to support request bodies as
large as apr_off_t allows (rather than as large as 'long' allows), and
simplify error handling.

PR: 27866


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103756 13f79535-47bb-0310-9956-ffa450edef68
2004-05-25 14:36:18 +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
Jeff Trawick
e3f81752cf Build array of allowed methods with proper dimensions, fixing
possible memory corruption.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102354 13f79535-47bb-0310-9956-ffa450edef68
2004-01-16 20:11: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
Paul J. Reder
3e85c7882d *) Add a hook (insert_error_filter) to allow filters to re-insert
themselves during processing of error responses. Enable mod_expires
     to use the new hook to include Expires headers in valid error
     responses. This addresses an RFC violation. It fixes PRs 19794,
     24884, and 25123. [Paul J. Reder]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102038 13f79535-47bb-0310-9956-ffa450edef68
2003-12-12 17:03:59 +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
32044c1ca5 fix the EBCDIC path in send_all_header_fields() to actually return something
the caller ignores it, but still...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101784 13f79535-47bb-0310-9956-ffa450edef68
2003-11-15 21:42:17 +00:00
Justin Erenkrantz
4c6709cf92 Resolve the ap_get_client_block() showstopper by looking at APR_BRIGADE_LAST
of what we get from ap_get_brigade and set a nugget for our next call to
pick up on.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101141 13f79535-47bb-0310-9956-ffa450edef68
2003-08-31 16:14:39 +00:00
Jeff Trawick
099e61ebdc Don't respect the Server header field as set by modules and CGIs.
As with 1.3, for proxy requests any such field is from the origin
server; otherwise it will have our server info as controlled by
the ServerTokens directive.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100182 13f79535-47bb-0310-9956-ffa450edef68
2003-06-06 02:48:55 +00:00
Martin Kraemer
36455c38a6 Porting EBCDIC: headers wer incorrectly (i.e., not) converted
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99748 13f79535-47bb-0310-9956-ffa450edef68
2003-05-09 21:37:55 +00:00
Jeff Trawick
491b134846 back out a recent change which causes the server to segfault or
otherwise fail, until such time that it can be fixed properly


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99612 13f79535-47bb-0310-9956-ffa450edef68
2003-04-26 02:24:48 +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
Graham Leggett
e3befc624e If a Date response header was already set in the headers array,
this value was ignored in favour of the current time. This meant
that Date headers on proxied requests where rewritten when they
should not have been.
PR:		14376
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99370 13f79535-47bb-0310-9956-ffa450edef68
2003-04-15 17:39:43 +00:00
Justin Erenkrantz
ce66773d84 Return 413 if chunk-ext-header is too long rather than reading from a truncated
line.

(Previously, we'd count the unread part of the line towards the chunk.)

PR: 15857


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98727 13f79535-47bb-0310-9956-ffa450edef68
2003-02-19 06:50:10 +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
d7cb5c9c64 don't apply byte ranges to redirects, error documents, etc.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97304 13f79535-47bb-0310-9956-ffa450edef68
2002-10-25 18:25:11 +00:00
Ryan Bloom
37f9061757 Fix a compile of compiler warnings. I don't know how these slipped past.
Also, uncomment a line of code that the last commit should have uncommented.
Randall found this line and the fix, but I forgot to uncomment this line
along with the fix.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97179 13f79535-47bb-0310-9956-ffa450edef68
2002-10-11 15:29:22 +00:00
Brian Pane
03b8f85c88 Fixed the new send_all_header_fields() function to properly
compute the size of the iovec array.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97135 13f79535-47bb-0310-9956-ffa450edef68
2002-10-07 15:30:43 +00:00
Brian Pane
39a227d48d Simpler, faster code for generating HTTP response headers:
Instead of passing a callback function to apr_table_do() to
generate one field at a time, just build an iovec containing
all the fields and make a single call to apr_brigade_writev().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97122 13f79535-47bb-0310-9956-ffa450edef68
2002-10-07 05:10:54 +00:00
Brian Pane
09ce7e3904 Switch the most frequent apr_brigade_write() and apr_brigade_puts()
calls to apr_brigade_writev() for improved efficiency


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96946 13f79535-47bb-0310-9956-ffa450edef68
2002-09-22 00:05:08 +00:00
Brian Pane
b59de5a08c Clean up the temporary brigade in error cases in ap_discard_request_body()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96663 13f79535-47bb-0310-9956-ffa450edef68
2002-09-06 01:27:48 +00:00
Brian Pane
d6aa2b601f Fixed some bucket memory leaks in ap_http_filter()
Submitted by:	Joe Schaefer <joe+apache@sunstarsys.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96662 13f79535-47bb-0310-9956-ffa450edef68
2002-09-06 01:18:55 +00:00
Brian Pane
95dbc8ea9a Free the temporary working brigade upon exit from ap_get_client_block()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96639 13f79535-47bb-0310-9956-ffa450edef68
2002-09-05 06:20:02 +00:00
Justin Erenkrantz
a85a3814b8 Fix FileETag None directive.
- Fix segfault on strlen computation on the empty string in vlv case
- If the etag is "", don't set the ETag header to be "" - leave the
  header NULL instead.

Andrew's patch would change ap_meets_condition to accept "", but Justin
thinks it would be better just to sidestep it all together and not set
ETag when it would be "".

PR: 12207
Submitted by:	Andrew Ho <andrew@tellme.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96609 13f79535-47bb-0310-9956-ffa450edef68
2002-09-01 18:31:30 +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
Greg Ames
787074640b remove some dead code. It's been there since 1996 (1.3 rev 1.28), so
extra eyeballs would be appreciated.

If it's not really dead, then we need to re-arrange this function so
that earlier changes to the r aren't lost.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96321 13f79535-47bb-0310-9956-ffa450edef68
2002-08-08 20:39:15 +00:00
William A. Rowe Jr
26e0cc6f6d Just an observation, we potentially read/retain far too much of the body,
and this can be optimized.  Not a problem for sendfile based byterange
  requests, but potentially lethal to serve byterange requests of any
  parsed or cgi generated responses.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96304 13f79535-47bb-0310-9956-ffa450edef68
2002-08-04 18:24:10 +00:00
William A. Rowe Jr
a6ac024104 catch up with the apr_atoll -> apr_atoi64 rename
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96299 13f79535-47bb-0310-9956-ffa450edef68
2002-08-03 19:36:33 +00:00
Wilfredo Sanchez
a47715f8fe Replace atol() calls which should return long long with apr_atoll() calls.
Submitted by: Shantonu Sen <ssen@apple.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96179 13f79535-47bb-0310-9956-ffa450edef68
2002-07-24 20:47:28 +00:00
William A. Rowe Jr
347341d9eb Solve C-L post body reads from the HTTP_IN by ap_get_brigade() so that
we know -immediately- that we've read the last of the data.  This patch
  adds an EOS bucket to the brigade if ctx->remaining has been consumed.

Reviewed by:	Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96104 13f79535-47bb-0310-9956-ffa450edef68
2002-07-17 19:18: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
Aaron Bannert
e4e4380ff8 Optimize away a couple 64bit integer divides.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96070 13f79535-47bb-0310-9956-ffa450edef68
2002-07-16 06:35:41 +00:00
Jim Jagielski
b05f096d5f Streamline the handling of C-L values in the common case by using
the known properties of ANSI strtol.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96052 13f79535-47bb-0310-9956-ffa450edef68
2002-07-14 13:18:58 +00:00
Brian Pane
3ef8a0f546 added apr_is_empty_array()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96051 13f79535-47bb-0310-9956-ffa450edef68
2002-07-13 18:16:33 +00:00
Brian Pane
667d57fb5b Replaced APR_USEC_PER_SEC division with the new apr_time_sec() macro
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95913 13f79535-47bb-0310-9956-ffa450edef68
2002-06-30 03:46:56 +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
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
Greg Ames
2a9d69a140 ap_discard_request_body: exit without reading the body if
connection->keepalive is false.  This works in conjunction with
ap_die which resets connection->keepalive any time
ap_status_drops_connection is true.  The latter is explicity tested
here in case ap_die isn't involved.

Submitted by:   Justin Erenkrantz, Greg Ames


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95882 13f79535-47bb-0310-9956-ffa450edef68
2002-06-24 17:06:19 +00:00
Aaron Bannert
c37b7fb8b5 Better document the error cases returned from get_chunk_size().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95810 13f79535-47bb-0310-9956-ffa450edef68
2002-06-19 18:43:28 +00:00
Roy T. Fielding
6753f54344 It isn't valid to check errno without setting it first, unless an
error return value already indicated that errno was set.  Also, we might
as well accept any error or junk remaining in the field as a parse error.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95743 13f79535-47bb-0310-9956-ffa450edef68
2002-06-18 00:14:21 +00:00
Justin Erenkrantz
3ea796a166 Do not use atol() for the Content-Length parsing as its handling of error
cases is undetermined by the ANSI C standard.

Instead, use strtol() with a check for the ERANGE error condition.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95740 13f79535-47bb-0310-9956-ffa450edef68
2002-06-17 22:46:30 +00:00
Justin Erenkrantz
b7319396a7 Rewrite ap_get_client_block to rely on assumptions that have been
solidified after this code was originally written.  Namely:

- AP_MODE_READBYTES will only return a brigade representing AT MOST bytes
  of data.  It can NOT return MORE than requested.
- APR_BLOCK_READ is respected - it is considered a design error of a filter
  if it returns without reading something.
- apr_brigade_flatten is available to do the heavy lifting of the copying
  into a flat buffer (as hinted at by the removed comment).

Tested with httpd-test.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95721 13f79535-47bb-0310-9956-ffa450edef68
2002-06-17 05:09:45 +00:00
Cliff Woolley
f75ee91d7e this comment is way bogus
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95656 13f79535-47bb-0310-9956-ffa450edef68
2002-06-13 20:30:09 +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
Justin Erenkrantz
c21c07ae09 Tighten this variable's scope to only where it is needed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95583 13f79535-47bb-0310-9956-ffa450edef68
2002-06-08 04:36:05 +00:00
Ryan Bloom
916940b895 Allow ap_discard_request_body to be called multiple times in the
same request.  Essentially, ap_http_filter keeps track of whether
it has sent an EOS bucket up the stack, if so, it will only ever
send an EOS bucket for this request.

Submitted by:	Ryan Bloom, Justin Erenkrantz, Greg Stein


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95505 13f79535-47bb-0310-9956-ffa450edef68
2002-06-04 18:50:13 +00:00