* Fix a memory leak by freeing the memory consumed by the bucket.
PR: 44948
Submitted by: Dan Poirier <poirier pobox.com>
Reviewed by: rpluem
Submitted by: rpluem
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@766002 13f79535-47bb-0310-9956-ffa450edef68
* APR_BUCKET_NEXT is wrong here as we are already a doing a APR_BUCKET_NEXT in
the for loop and this causes us to jump *two* buckets forward. This can cause
us to jump over the Sentinel of the brigade and thus causes an endless loop.
Submitted by: rpluem
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@766001 13f79535-47bb-0310-9956-ffa450edef68
Creation of external gzip process fails, if we
try to set the working directory to r->filename.
Use ap_make_dirstr_parent() instead, like in all
other similar places.
Creating the external gzip process fails, because we
call execve() with "gzip" without full path.
Let's look for it in the PATH instead and drop the
passing of the environment. There seems to be no
reason why gzip should need the httpd environment.
Set the content encoding for compressed content
even if we can't detect the content type of the
uncompressed content.
When trying to detect the content type of the
uncompressed content it is often not enough
to read the same number of bytes, we already
read compressed. Since uncompress() allocates a
new buffer, we can increase the number of bytes
to read to the same size, we use in the case,
where the content isn't compressed.
Furthermore zero-terminate the read data to keep
assumptions consistent with the uncompressed case.
Submitted by: rjung
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@765999 13f79535-47bb-0310-9956-ffa450edef68
etag to be emitted for on-the-fly gzip content-encoding.
PR 39727 will require larger fixes and this fix was far more
harmful than the original code.
PR: 45023, 39727
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@761835 13f79535-47bb-0310-9956-ffa450edef68
mod_version needs to be compiled because the test framework requires it
(and the feature doesn't make much sense if it crashes httpd on test).
Submitted by: fielding
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@743852 13f79535-47bb-0310-9956-ffa450edef68
mod_ssl: Make the size of the per-dir-reneg request-body buffer
configurable, by popular demand:
* modules/ssl/ssl_private.h: Define DEFAULT_RENEG_BUFFER_SIZE.
(SSLDirConfigRec): Add nRenegBufferSize field.
* modules/ssl/ssl_engine_config.c (ssl_cmd_SSLRenegBufferSize): New
function.
(ssl_config_perdir_create, ssl_config_perdir_merge): Handle
nRenegBufferSize.
* modules/ssl/ssl_engine_io.c (ssl_io_buffer_fill): Take max buffer
size as an argument rather than compile-time constant.
* modules/ssl/ssl_engine_kernel.c (ssl_hook_Access): Pass
nRenegBufferSize to ssl_io_buffer_fill.
* modules/ssl/mod_ssl.c (ssl_config_cmds): Add SSLRenegBufferSize.
PR: 39243
* Correctly merge SSLRenegBufferSize directive.
PR: 46508
Submitted by: <tlhackque yahoo.com>
Reviewed by: rpluem, jorton, pgollucci
* Add a stub documentation for SSLRenegBufferSize.
* docs/manual/mod/mod_ssl.xml: Flesh out SSLRenegBufferSize
docs a little - thanks rpluem!
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@739605 13f79535-47bb-0310-9956-ffa450edef68
*) mod_rewrite: Introduce DiscardPathInfo|DPI flag to stop the troublesome
way that per-directory rewrites append the previous notion of PATH_INFO
to each substitution before evaluating subsequent rules.
PR38642 [Eric Covener]
axe r->path_info in a more standard way, suggested by Aleksander Budzynowski
doc typo spotted by Vincent Bray
Submitted By: Eric Covner
Reviewed by: jorton, pgolluci
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@739600 13f79535-47bb-0310-9956-ffa450edef68
look for 'no-cache' in subprocess_env to prevent the saving
of an otherwise cacheable response.
document no-cache envvar
Submitted by: covener
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@733762 13f79535-47bb-0310-9956-ffa450edef68
CGI: return 504 (Gateway timeout) rather than 500 when a script
times out before returning status line/headers.
PR 42190
Improve canned 504 error message in the light of r729586 and covener's comment.
Submitted by: niq
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@733757 13f79535-47bb-0310-9956-ffa450edef68
pass a server_rec to ap_log_error on two interim response messages
use ap_log_rerror instead of r->server per niq's comments
Submitted by: covener
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@733756 13f79535-47bb-0310-9956-ffa450edef68
*) mod_ldap: Avoid a segfault when result->rc is checked in uldap_connection_init
when result is NULL. This could happen if LDAP initialization failed.
PR 45994. [Dan Poirier <poirier pobox.com>]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@727773 13f79535-47bb-0310-9956-ffa450edef68
When an expires or cache-control header are sent, the RFC does allow us to cache normally non-cacheable response statuses.
Submitted by: Alex Polvi <alex polvi.net>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@727599 13f79535-47bb-0310-9956-ffa450edef68
* Avoid sending no answer at all if a custom error page causes an
AP_FILTER_ERROR.
* allow ap_invoke_handler() to pass-through AP_FILTER_ERROR as if it were
a reserved status code (OK/DECLINED/SUSPENDED). Prevents ap_die() from seeing a
500 error when the http header filter has already taken care of the proper
error response
* To be safe, consume the entire brigade after processing an error bucket in
the HTTP output filter.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@722642 13f79535-47bb-0310-9956-ffa450edef68
* info->expire and info->date are in microseconds. So convert the difference
to seconds before comparing it to age which is in seconds.
PR: 39713
Submitted by: Owen Taylor <otaylor redhat.com>
Reviewed by: rpluem, jim, jfclere
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@720171 13f79535-47bb-0310-9956-ffa450edef68
* Use distinct char pointers for sending and receiving buffers to avoid
destroying the pointer to the sending buffer in the ajp message if
data is received from the backend before all data is sent to the
backend.
PR: 45911
Submitted by: rpluem
Reviewed by: rpluem, jim, jfclere
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@714273 13f79535-47bb-0310-9956-ffa450edef68
Add force recovery for balancer.
In case all balancer members were in error state 503
was returned until the recovery timeout expired.
The patch forces recovery in case all balancer members
are in error state regardless of recovery timeout
directive.
This fixes the time gap when 503 was returned and
backend was already up and running.
Submitted by: mturk
Reviewed by: jim, rpluem, jfclere
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@714270 13f79535-47bb-0310-9956-ffa450edef68
AJP was dropping pre-existing cookies. Use same logic
as HTTP to tuck them away
* save_table needs to be declared first before it can be used.
Reviewed by: rpluem, jim, mturk
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@711850 13f79535-47bb-0310-9956-ffa450edef68