Streamline this function, and append the trailing slash for any directories
that are resolved. Needs to be more tightly coupled to the dir_walk
optimized cache.
This will probably fix recent breakage to mod_negotation and httpd.test,
as well as the /manual/ returning docroot/index. Need to look for another
solution. I'm suspecting path_info is possibly broken.
Aaron Bannert [Tue, 16 Oct 2001 01:04:08 +0000 (01:04 +0000)]
Cautiously avoiding the scoping issue that was discussed on the list,
I thought these other changes needed to go in; Namely that we don't
need to check if the brigade is empty twice in the loop, just once.
Added a comment for good measure.
Doug MacEachern [Mon, 15 Oct 2001 23:14:11 +0000 (23:14 +0000)]
disabling mod_example ap_hook_{http_method,default_port}
breaks things such as httpd-test when http_method is "foo"
PR:
Obtained from:
Submitted by:
Reviewed by:
Clarify the new MultiviewsMatch directive. I wanted this down on 'paper',
even if it isn't proofread - please feel free to touch up.
BTW - the new 'cleaned' formatting really stinks for hand-editing,
the indentation really needs works. Our per-directive meta-info is
the ugliest aspect. Would be good if the cleanup code could be customized
to make the html not only clean, but legible ;)
Fix the first bucket not getting chunked properly. The reason was that
we left the TE header in the output headers, so ap_set_keepalive didn't
set r->chunked to 1. So, ap_http_header_filter wouldn't insert CHUNK
filter appropriately. I have no clue how it chunked anything at all
before this patch, but hey, it looks right now.
Tested with Yahoo, Apple, apache.org, and /.
/. is interesting in that it sends both Conn: Close and TE: chunked.
Well, now I know what the bio_is_renegotiating call was for.
Place a big-ass comment there so that whomever comes next isn't stuck
at a cryptic call that they don't understand with a dinky comment.
Hopefully, this makes sense. Someone more familiar with OpenSSL should
verify the comment.
This fix also requires the normalize call to be performed before
churn_input so that we don't enter churn_input with a 0-length ctx->b
brigade.
All httpd-test tests (except for the module/negotiation test) pass now.
Ok, this formats a whole lot cleaner, and (I believe) makes a bit more
sense. Also provides a rundown of C89 common date format strings, for
those users who don't have man strftime [It still points out that add'l
format options may b available, see strftime.]
Also, I believe _most_ installations require the TransferLog "|bin/
path to rotatelogs, no? Other question - how to reformat to html?
Which utility does so?
Close the mod_mime file extension matching issue by (as Ken Coar suggests)
allowing users to continue to rely on the old 1.3 behavior of matching Any
extensions, the strict behavior of matching NegotiatedOnly arguments, or
including Handlers and Filters with the MultiviewsMatch directive for
mod_negotiation control. Unfortunately, the component matching occurs
in mod_mime, so that's where this option must reside.
Ryan Bloom [Thu, 11 Oct 2001 04:40:14 +0000 (04:40 +0000)]
Remove some warnings from the code. The buckets take a different
type for the length than the brigade functions do. This moves the
len_read variable into the correct scope for the two times that it
is used, and defines it correctly for each scope.
This is the mod_ssl input filtering rewrite. Lots of stuff here. I also
changed some of the style issues within the filtering code to conform to
the rest of the server.
Various incarnations of this patch have been posted to dev@httpd without
feedback. Now that it passes all of the httpd-test cases (with the
exception of module/negotiation test which fails without mod_ssl anyway),
it is time to check it in.
Please review and test. We are under C-T-R rules, so I'm going to take
advantage of that and commit it now. I have tested this about as much
as I can and it seems to work from everything I can give to it.
Considering that mod_ssl was broken before this commit, this is an
improvement.
We can't pass in &r->remaining because we change that value on output to
be how many bytes we read. This trounces on the r->remaining value, so
we must use a local variable and subtract that from r->remaining after we
read.
Reviewed by: Aaron Bannert
The problem here is that we are getting some zero-length buckets at the head
of our brigade - which are in isolation okay. In this situation, they
must be removed by the call to APR_BRIGADE_NORMALIZE.
The way we partition the buckets means that we will never remove the
zero-length bucket from the head - causing an infinite loop. We read only
a single bucket now - previously partition with the blocking reads would
read multiple buckets - but it forced having a defined length which we
agreed was bogus.
Therefore, if we have a zero-length bucket at the head, we would then try
to partition and split at the zero-point of the brigade. That combination
doesn't actually remove the zero-length bucket - it is still there - causing
an infinite loop because we'll never go past the zero-length bucket.
This call was originally present in core_input_filter. I think it might
be better to fix partition/split/etc to eliminate a zero-length bucket
and skip it. But, I'm not 100% sure that needs to happen.
Negotiation once allowed any file, of any filename extension, to be
served. The original patch to mod_negotation eliminated all extensions
that did not reflect filename extensions associated with negotiation
variables, unless the user expressly specified the file name with those
filename extensions.
This patch [attributed to me] was vetoed at its inception, it was provided
as an alternative for those who had to have the current behavior.
There is now another alternative patch that would introduce the
MultiviewsMatch directive to mod_mime, for consideration and discussion.
Short of removing the headers filter, this is the best asis can do.
Note that all body replies were entirely broken (thanks for helping
me notice this, Greg :)
Allow mod_so to be enabled by default even if no shared libraries from the
core are requested.
If you want to disable shared library support, pass --disable-so to
configure (as always). This will enforce that your httpd can NOT use
shared libraries - which may be a good thing for you to do.
Justin added the APR_HAS_DSO check per discussion on-list between Aaron,
Ryan, Greg, and the rest of the peanut gallery. This should allow us
to not build mod_so when it isn't supported. However, the rest of the
configure scripts need to know that shared objects aren't supported and
complain accordingly. (sharedobjs = yes, error out?)
Speed it up. While this optimization wasn't obvious for the two-pass
location_walk, it is significant for all subreq/redirects reusing the
cached walk values.
Greg Ames [Tue, 9 Oct 2001 01:33:48 +0000 (01:33 +0000)]
prevent near infinite subrequest recursion with mod_negotiation enabled.
This can happen if there is a partial match between a bad URI and a
file with a variant extention.
ap_sub_req_lookup_dirent has apparently been generating bogus subrequest
URIs for ages, but they used to be ignored. Once we started calling
ap_process_request_internal for all subrequests, they started causing
problems. Make it explicit that rnew->uri is to be ignored for this type
of subrequest.
Ryan Bloom [Mon, 8 Oct 2001 23:28:57 +0000 (23:28 +0000)]
Clean up the string passed to the error log hook. This removes the date,
time, error level, etc strings. The only information in the string is
the actual error.
Submitted by: Jon Travis <jtravis@covalent.net>
Greg Stein [Mon, 8 Oct 2001 23:10:37 +0000 (23:10 +0000)]
Don't set r->status_line. Apache uses that in preference to any other status
line, thinking we've set a custom status. Of course, it says "200 OK" no
matter what error we happen to return(!).
Ian Holsman [Mon, 8 Oct 2001 21:49:17 +0000 (21:49 +0000)]
dechunking filter removed.
add HTTP_IN filter after the headers have been parsed.
so that the HTTP_IN can check them ;-)
Still not 100% if this works properly, but I don't get
the chunking numbers displayed on my browser,
so it's better than what was there.
PR:
Obtained from:
Submitted by:
Reviewed by:
Greg Stein [Mon, 8 Oct 2001 20:12:50 +0000 (20:12 +0000)]
HTTP_IN was attempting to process the PEEK mode. This threw off
check_pipeline_flush(), making it think another request was available (when
it wasn't). Apache would avoid flushing the prior request and block on
reading the next request. (of course, the client wasn't sending the next
one, cuz it was still waiting for the results of the first one)
Ian Holsman [Mon, 8 Oct 2001 19:25:35 +0000 (19:25 +0000)]
initial port of new Request-mode HTTP_IN filter to proxy.
Status: It serves a reverse-proxy page.. but SLOWLY.
VERY SLOWLY.
still looking at why, but now it serves pages instead of dumping core.
PR:
Obtained from:
Submitted by:
Reviewed by:
Revamped ap_directory_walk logic, without a path_info helper is now
activated. It may be bumpy for a few days, and we have more optimizations
to put in place, but it's time to get this in the developer's test code.
A major overhaul to the -replacement- ap_directory_walk logic. This still
doesn't activate that code, I will do so probably by Monday, after more
thorough testing.
Introduces the ap_directory_walk::cache so we can stop wasting tons of
effort in mod_autoindex and other subreq/redirect requests.
This isn't thoroughly tested, I've only stepped through a half dozen
common cases. If you want to play, define REPLACE_PATH_INFO_METHOD.
Allow the core input filter to handle AP_NONBLOCK_READ request for a
finite number of bytes (i.e. *readbytes > 0).
ap_brigade_partition does a blocking read. So, what we should do is
apr_bucket_read on the socket for non-blocking. If we get less than
what they asked for, that's okay and we should just return that amount.
If they were non-blocking, we should always be non-blocking.
Ryan, Greg, and others can figure out if ap_brigade_partition should
be tweaked to handle AP_NONBLOCK_READ natively. I'm of a mixed mind,
but this addresses the short term need.