support it. This defines a symbol called AP_SIG_GRACEFUL in
ap_config_auto.h which will have the appropriate signal value. All
direct references to SIGWINCH have been replaced with AP_SIG_GRACEFUL.
On Linux 2.0, use SIGWINCH instead since SIGUSR1 is used by glibc
2.0's user-space threading library to control threads. All later
versions of Linux/glibc don't have this problem. (Not to mention the
security holes in older Linux versions which make it unsuitable for
use as a web server.) If your platform doesn't have SIGUSR1, use the
appropriate mojo in configure to define what your graceful restart
signal should be.
In theory, a configure switch could be added to allow the admin to
specify the appropriate signal that should be used. This is left
as an exercise to the reader for now.
The docs need to be updated. Since the signal is now configurable,
just saying SIGUSR1 for graceful restart isn't completely true. Also,
the apachectl functionality needs to be moved into httpd - this is
what Win32 does and it makes us consistent across platforms.
Roy issued a veto against use of SIGWINCH by default, so this should
resolve that veto.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91076 13f79535-47bb-0310-9956-ffa450edef68
a pointer to the OLD_WRITE frec, and instead of using strcmp or strcasecmp,
we can just do a simple pointer comparison. This optimization is also
available to other modules.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91006 13f79535-47bb-0310-9956-ffa450edef68
There were some places that were expecting what you put into frec
would be what frec->name would be. Not true anymore.
There are enough other places that were already doing the strcasecmp
that it makes more sense to just make it all strcasecmp across the
board rather than changing the UPPERCASE to lowercase.
(None of these with the exception of old_filter look to be in the
critical path anyway...)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90890 13f79535-47bb-0310-9956-ffa450edef68
and have those methods <limit>able in the httpd.conf. It uses
the same bit mask/shifted offset as the original HTTP methods
such as M_GET or M_POST, but expands the total bits from an int to
an ap_int64_t to handle more bits for new request methods than
an int provides.
Submitted by: Cody Sherr <csherr@covalent.net>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89869 13f79535-47bb-0310-9956-ffa450edef68
This includes two changes to APR:
* new functions apr_itoa, apr_ltoa, and apr_off_t_toa
that provide itoa-type functionality based on pools
* Inline code in inet_ntop4 to replace sprintf for converting
binary IP addresses into dotted-decimal format
and two changes to Apache:
* use the apr_itoa functions in setting the content length,
in place of apr_psprintf
* use the apr_itoa functions to replace frequent uses of
'sprintf("%d",...)' in mod_log_config.
Submitted by: Brian Pane
Reviewed by: Dean Gaudet, Greg Ames
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89686 13f79535-47bb-0310-9956-ffa450edef68
CGI scripts was being buffered in the brigade before any of it was
written to the network. cl filter now honors flush and implements a
buffer threshold.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89503 13f79535-47bb-0310-9956-ffa450edef68
and apr_bucket_file_make().
*) Simplify mod_file_cache's sendfile_handler by taking advantage
the new ability of file buckets to handle files opened in XTHREAD
mode. [Also inlined some of the brigade construction stuff in
mod_file_cache's handlers to save a palloc() or two.]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89438 13f79535-47bb-0310-9956-ffa450edef68
prefix to all of the uri functions (yuck), changing some includes,
and using APR error codes instead of HTTP-specific error codes.
Other notes to test this patch:
- You need to delete the util_uri.h file - exports picks up on this.
- I'd like to remove the apr_uri.h from httpd.h, but that might
increase the complexity of this patch even further. Once this patch
is accepted (in some form), then I can focus on removing apr_uri.h
from httpd.h entirely. I need baby steps (heh) right now.
- I imagine that this might break a bunch of stuff in Win32 or other OS
builds with foreign dependency files. Any help here is appreciated.
This is a start... -- justin
Submitted by: Justin Erenkrantz
Reviewed by: Roy Fielding
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89198 13f79535-47bb-0310-9956-ffa450edef68
again. The problem is that the amount of data read from the network,
is not necessarily the amount of data returned from the filters. It is
possible for input filters to add bytes to the data read from the network.
To fix the original bug, I just removed the line from ap_get_client_block
that decremented r->remaining, we allow the http_filter to do that for
us.
I have also removed an incorrect comment.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89041 13f79535-47bb-0310-9956-ffa450edef68
which corresponded to r->remaining (in ap_get_client_block). However,
ap_get_client_block was *also* adjusting r->remaining. Net result was that
PUT (and probably POST) was broken. (at least on large inputs)
To fix it, I simply removed the indirection on "readbytes" for input
filters. There is no reason for them to return data (the brigade length is
the return length). This also simplifies a number of calls where people
needed to do &zero just to pass zero.
I also added a number of comments about operations and where things could be
improved, or are (semi) broken.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89008 13f79535-47bb-0310-9956-ffa450edef68
determine how much data is returned to the previous filter. Prior to this
change, we used a field in the conn_rec to determine how much to return.
After this change, we use an argument to ap_get_brigade. This makes it
much more obvious how things work at all levels, so that module authors
can easily determine how much data is supposed to be returned to them.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88912 13f79535-47bb-0310-9956-ffa450edef68
told me I was wrong. I was wrong, and Greg was right. This commit
just moves the byterange filter and its related functions out of the core,
and puts them back in the HTTP specific module.
Submitted by: Greg Stein
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88815 13f79535-47bb-0310-9956-ffa450edef68
controversial change, because this is kind of HTTP specific. However
many protocols should be able to take advantage of this kind of
information. I expect that headers will need one more layer of
indirection for multi-protocol work, but this is a small step in
the right direction.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88580 13f79535-47bb-0310-9956-ffa450edef68
Add a debug assertion to verify that c->remain is zero when a new
request starts. ap_http_filter() does the wrong thing otherwise.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88540 13f79535-47bb-0310-9956-ffa450edef68
a request while it is being created. This hook is called for all
request_rec's, main request, sub request, and internal redirect.
When this hook is called, the the r->main, r->prev, r->next
pointers have been set, so modules can determine what kind of
request this is.
Currently, this is only used by the core module, but protocol modules
are going to need to have the ability to affect the request while it is
being read.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88532 13f79535-47bb-0310-9956-ffa450edef68
It sorts out the problem when a password protected reverse proxy URL
sends a Proxy-Authenticate to a browser instead of a WWW-Authenticate.
This patch covers the changes to the httpd-2.0 tree.
Submitted by: Graham Leggett
Reviewed by: Chuck Murcko
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88527 13f79535-47bb-0310-9956-ffa450edef68
This has been tested with a couple of directory listings, but it could
probably use a bit more testing before being declared stable.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88454 13f79535-47bb-0310-9956-ffa450edef68