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
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
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
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
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
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
- 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
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
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
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
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
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
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
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
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
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
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