safe to add the core_filter during the post_read_request, and it means
that we only have to add the filter once in the code. This should make
it easier to add an SSL module in the future.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86307 13f79535-47bb-0310-9956-ffa450edef68
HTTP_BAD_REQUEST) don't send any error message content to the browser.
The core_filter wasn't present this early in request parsing, so the output
went into the bit bucket via r[v]puts->ap_pass_brigade.
The chunking filter takes care of itself nicely, because it is added in
ap_send_http_header if it's needed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86253 13f79535-47bb-0310-9956-ffa450edef68
is add part of the infrastructure. Namely:
1) filter list in the conn_rec, which is where the input filter list
must live
2) Split the register_filter into multiple functions, one to register
input filters the other to register output filters.
3) Modify existing modules so they still work.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86251 13f79535-47bb-0310-9956-ffa450edef68
(in various places).
In ab, change the declaration of argv so that it can be passed into
apr_initopt() without warning.
Submitted by: Victor J. Orlikowski <v.j.orlikowski@gte.net>
Reviewed and modified slightly by: Jeff Trawick
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86229 13f79535-47bb-0310-9956-ffa450edef68
and fix the comment explaining how to reduce the incidence of tiny chunks.
Submitted by: Jeff Trawick
Reviewed by: Tony Finch
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86222 13f79535-47bb-0310-9956-ffa450edef68
that have been previously registered with the server. Currently the
directive is only valid inside the config file, but once the Options
directive is tweaked a bit, I would feel more comfortable exposing this
directive to htaccess files.
As a part of making adding this filter, I removed the ctx pointer from the
ap_add_filter prototype. The problem is that the core is the thing that
is actually inserting the filter into the filter stack, but the core doesn't
know how to allocate memory for each filter. The solution is to have the
filters themselves be responsible for allocating the ctx memory whenever
it is required.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86220 13f79535-47bb-0310-9956-ffa450edef68
bound to hard-coded names and a bitmask. We still use the
bitmask for known methods, but we also have an array for
extension method named. Wherever we used the M_* constants
we need to use a routine that knows about the new structure instead.
This is far from complete, but AFAIK this interim work doesn't
break anything -- especially the compile. The rest of the
work will be added in segments; this is just a checkpoint.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86210 13f79535-47bb-0310-9956-ffa450edef68
entry, it saw there were zero bytes and simply returned. the client
would never receive "end of response" and timeout (or the server would
timeout the client).
*) added comments about what is going on
*) place chunk start/end markers around just the content, if that content
is non-zero in length
*) insert all the right "end of response" stuff before the EOS bucket
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86193 13f79535-47bb-0310-9956-ffa450edef68
empty. Avoiding referring to the element type in the macros resulted
in some double dereferences that did the wrong thing.
Reported by: Jeff Trawick
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86184 13f79535-47bb-0310-9956-ffa450edef68
new AP_RING macros. Most of this commit is fairly pedestrian as you
would expect, but I had to redo the chunking filter because of the
amount of pointer juggling it did. I have done some minimal testing
of this patch and it seems to work.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86178 13f79535-47bb-0310-9956-ffa450edef68
we use a modified LIFO. It is modified, because if we add a filter while
in the middle of another filter, the added filter gets put in after the
current filter. This requires that the server is smart about which filters
are added when. This should be handled by the HTTP protocol, but we will
want to keep and eye on things for a little while.
This change is necessary, because currently when we add a filter it goes
after the last filter of the same type. This is broken whenever we want
to add a filter that has a dependancy. Think about the core and chunking
filters. They are of the same type, and core is always added first. When
we go to insert chunking, it gets added, but it is never called.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86161 13f79535-47bb-0310-9956-ffa450edef68
As soon as we hit such a bucket, we'll read from it then pass everything
we have so far on to the next filter. At that point we'll start over.
Also, increase the size of the chunk header buffer to handle larger
lengths.
Note: There is still an extra final chunk header (0) when mod_cgi is used
because EOS is coming down twice.
This is likely to have some bugs here and there. Even worse, it is butt
ugly and in need of simplification.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86155 13f79535-47bb-0310-9956-ffa450edef68
filtering beginning to work. There is a hack that has been repeated
through this patch, we morph a pipe into a socket, and put the socket
into the BUFF. Everytime we do that, we are working with a pipe from
a CGI, and we should be creating a pipe bucket and passing that bucket
back. Because we don't actually have pipe buckets yet, we are using this
hack. When we get pipe buckets, this will be fixed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86136 13f79535-47bb-0310-9956-ffa450edef68
buckets, and alter the HEAP and MMAP buckets to use it. Change
the way buckets are initialised to support changing the type of
buckets in place, and use it when setting aside TRANSIENT buckets.
Change the implementation of TRANSIENT buckets so that it can be
mostly shared with IMMORTAL buckets, which are now implemented.
Reviewed by: rbb
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86115 13f79535-47bb-0310-9956-ffa450edef68
1) don't put the trailing 0\r\n\r\n in lenstr; that buffer is
already in use (pointed to by another transient bucket); using
lenstr again overlays that other chunk header
2) insert the bucket with the trailing "0\r\n\r\n" *before* the eos bucket
Submitted by: Jeff Trawick <trawickj@bellsouth.net>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86095 13f79535-47bb-0310-9956-ffa450edef68
bug fix in chunk_filter(): it was creating the wrong-size bucket.
chunking now appears to be working (without using BUFF).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86092 13f79535-47bb-0310-9956-ffa450edef68
bucket brigades are sent to this filter, it inserts the chunking header
at the front of the brigade. When the filter sees an EOS bucket, it
adds the 0 chunking trailer.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86090 13f79535-47bb-0310-9956-ffa450edef68
to add and modify data while processing a request. The docs still need
to be updated, and a simple html page needs to be created explaining all
of this.
The only filter currently in the code is the core filter. This filter
takes a bucket brigade and writes it to the network through the buff
structure. In time, the buff will go away completely.
More filters will need to be written.
Submitted by: The Apache Community
Reviewed by: The Apache Community
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86059 13f79535-47bb-0310-9956-ffa450edef68
of varfing. Nothing takes advantage of this yet; that's coming
next. Also replace the shorthand Allow setup to use the new
API (this is possibly a problematical change for the core default
handler; no problem to back that out).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86057 13f79535-47bb-0310-9956-ffa450edef68
see src/lib/apr/apr_compat.h for most details.
Also a few minor nits to get Win32 to build.
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86008 13f79535-47bb-0310-9956-ffa450edef68
as EXEC_ON_READ was causing a seg fault, and it was unnecessary. Neither
of these directives changes how the server interprets the config file,
they only change how the server responds to the configuration.
PR: 6318
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85883 13f79535-47bb-0310-9956-ffa450edef68
apr.h (defined in apr.h.in and apr.hw). This is needed -only- in APR
created files (true raw files) such as logs. It is not required in any
splat to screen (stderr/stdout) formatting, nor any html markup.
Some other modules slipped through in the prior apr_strings.h commit.
Sorry 'bout that.
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85878 13f79535-47bb-0310-9956-ffa450edef68
create a new header for those functions. This is the first step to
removing the apr/lib directory completely, and moving those files/functions
to descriptive directories.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85867 13f79535-47bb-0310-9956-ffa450edef68
defined but ap_sendfile fails with APR_ENOTIMPL, the BUFF implementation
of ap_send_fd will get a shot at serving the request. This fix is
required to get Apache working on 95/98 again and can also be useful on
Unix systems where sendfile is available via a servicepack/fixpack/PTF
on a particular level of the OS (e.g., AIX 4.3.2 base does not include
sendfile but is is available with a PTF).
This fix also reimplements the mod_file_cache sendfile_handler using
ap_send_fd and sets the connection aborted flag if the sendfile fails.
Future modification... Add code to ap_send_fd to hijack any data in the
client BUFF structure and send it along with the sendfile.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85810 13f79535-47bb-0310-9956-ffa450edef68
Include time.h for time().
This removes a bunch of compiler warnings with gcc -Wall on AIX.
Submitted by: Jeff Trawick, Victor Orlikowski
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85723 13f79535-47bb-0310-9956-ffa450edef68
argument to register hook fn takes a __cdecl function, so _NONSTD it is.
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85716 13f79535-47bb-0310-9956-ffa450edef68