summaryrefslogtreecommitdiffstats
path: root/server/core.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate potential ap_server_root_relative segfaults, with the inputWilliam A. Rowe Jr2002-03-161-8/+13
| | | | | | | | | | | of Jeff Trawick's style changes to the first patches. Doesn't include the fixes to ssl [more complex], and we won't trap errors that involve ap_serverroot, since we presume that was normalized on the way in. Therefore, testing ap_server_root_relative(DEFAULT_FOO) cases should never become necessary. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93965 13f79535-47bb-0310-9956-ffa450edef68
* Update our copyright for this year.Roy T. Fielding2002-03-131-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
* As hinted on dev@httpd, change filter naming schemes to match ourJustin Erenkrantz2002-03-071-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | expectations of their usage. The reason that we should make this change now is that we have changed the implied meaning of AP_FTYPE_HTTP_HEADER - some users of this should be PROTOCOL while others should be CONTENT_SET. In order to clarify it, toss all of the bogus names and force the filter writers to make sure they understand what they are doing. CONTENT_SET is new (horrible name - change if you have better idea), but it indicates that it should run between RESOURCE and PROTOCOL. mod_deflate is the ideal CONTENT_SET filter. The changed type names are: CONTENT is now RESOURCE. HTTP_HEADER is now PROTOCOL. However, most filters that used HTTP_HEADER may want CONTENT_SET. (Only things like POP and HTTP belong as PROTOCOL.) MMN bump since all filters need to be recompiled due to filter reordering. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93756 13f79535-47bb-0310-9956-ffa450edef68
* Remove the prev pointer from the filter chain. This removesRyan Bloom2002-03-071-1/+1
| | | | | | | | | | | the complexity of trying to set the filter chain correctly, with the side-effect of forcing us to walk the entire chain whenever we add a filter. Since the filter chains are small, the decrease in complexity is worth it. Reviewed by: Allan Edwards git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93745 13f79535-47bb-0310-9956-ffa450edef68
* Fix a bug in the APR_MODE_EXHAUSTIVE mode for the core input filter.Aaron Bannert2002-03-061-3/+6
| | | | | | | | | | This patch changes nothing outside of that mode. Also, why do we ever call apr_brigade_length() in the core? This doesn't seem right to me, so here's a comment above the other call. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93736 13f79535-47bb-0310-9956-ffa450edef68
* Sander's Stylistic SubmissionIan Holsman2002-03-051-608/+748
| | | | | | | | | | | (de-tab) PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93717 13f79535-47bb-0310-9956-ffa450edef68
* fix <Directory ~ blah> containers.Greg Ames2002-03-051-3/+4
| | | | | | | | | | also, eradicate a few nefarious tabs which were found lurking in the vicinity. Submitted by: Rob Simonson <simo@us.ibm.com> Reviewed by: Greg Ames git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93711 13f79535-47bb-0310-9956-ffa450edef68
* Only insert net_filter once per request. Initialize the outputRyan Bloom2002-03-051-0/+2
| | | | | | | protocol filters. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93709 13f79535-47bb-0310-9956-ffa450edef68
* Ensure that net_time filter isn't added on subreqs - we assume that it isJustin Erenkrantz2002-03-041-3/+2
| | | | | | | | | | added on !r->main requests. This led to infinite loop/SEGV when dealing with anything that created a subreq. (I don't think core_create_req is a good place for adding this filter.) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93694 13f79535-47bb-0310-9956-ffa450edef68
* Classify some of the input filters as the correct types. Previous toRyan Bloom2002-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | this patch, the type wasn't too important, because all filters were put on the same list. After this patch, the filter type is very important, because there are three different types of filters, and they are all treated differently, namely: CONNECTION: Filters of this type are valid for the lifetime of this connection. PROTOCOL: Filters of this type are valid for the lifetime of this request from the point of view of the client, this means that the request is valid from the time that the request is sent until the time that the response is received. CONTENT: Filters of this type are valid for the time that this content is used to satisfy a request. For simple requests, this is identical to PROTOCOL, but internal redirects and sub-requests can change the content without ending the request. It is important to realize that the three major types above are actually broken down into smaller groups in the code, to ensure that the ordering of filters is always correct. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93688 13f79535-47bb-0310-9956-ffa450edef68
* Fix segfault if content_type is NULL.Justin Erenkrantz2002-02-261-3/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93570 13f79535-47bb-0310-9956-ffa450edef68
* I learned about AP_MODE_EXHAUSTIVE while reading some of the new filterRyan Bloom2002-02-251-8/+10
| | | | | | | | | | | | code earlier today. With this mode, the Perchild MPM can finally be fixed to work with filters. I have changed a comment in the core to make it clear that this mode is required, but I have mentioned how dangerous this mode is. Also add a comment to STATUS about my plans. Hopefully I'll have some time this week to hack through the MPM. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93565 13f79535-47bb-0310-9956-ffa450edef68
* This code should be a noop today. But I did not feel comfortable aboutWilliam A. Rowe Jr2002-02-211-2/+3
| | | | | | | | | | | | reusing/recopying each bucket -after- inserting it into the brigade. Also, copying bucket c from b from a seemed obtuse. This patch creates the single bucket, makes a copy of it for each sendfile chunk we are about to add to the brigade, and finally consumes that initial bucket as the final file bucket of the brigade. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93534 13f79535-47bb-0310-9956-ffa450edef68
* Fix the close-on-sendfile bug where Win32 would transmit a singleWilliam A. Rowe Jr2002-02-211-1/+1
| | | | | | | | | sendfile bucket and then lose it's socket, and fix a comment. Submitted by: Ryan Morgan <rmorgan@covalent.net> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93524 13f79535-47bb-0310-9956-ffa450edef68
* Introduce AddOutputFilterByType directive.Justin Erenkrantz2002-02-191-0/+127
| | | | | | | | | AddOutputFilterByType DEFLATE text/html (I will add docco soon, I promise. If someone beats me to it, cool...) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93490 13f79535-47bb-0310-9956-ffa450edef68
* stop using APR_BRIGADE_NORMALIZE()Jeff Trawick2002-02-171-2/+19
| | | | | | | | (okay, making a copy of it is cheating perhaps, but the name of the game is to get APR_BRIGADE_NORMALIZE() out of the API) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93458 13f79535-47bb-0310-9956-ffa450edef68
* Be a bit more sane with regard to CanonicalNames. If the user hasRyan Bloom2002-02-061-3/+6
| | | | | | | | | | | specified they want to use the CanonicalName, but they have not configured a port with the ServerName, then use the same port that the original request used. Submitted by: Ryan Bloom and Ken Coar git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93296 13f79535-47bb-0310-9956-ffa450edef68
* yet another tweak to empty brigade checking on entry to core_input_filter():Jeff Trawick2002-02-061-2/+5
| | | | | | | | | | | | | | since APR_BRIGADE_EMPTY() assumes a non-empty brigade, we have to check before invoking that macro since APR_BRIGADE_EMPTY() can make a brigade empty, we have to check after invoking that macro An obvious variation of this fix would be to change APR_BRIGADE_NORMALIZE() to deal with empty brigades. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93293 13f79535-47bb-0310-9956-ffa450edef68
* - Fix up a comment so that it makes more sense and explains why we returnJustin Erenkrantz2002-02-061-2/+22
| | | | | | | | | | | | APR_EOF instead of an EOS bucket. - Start to try to be nice when we *know* we are EOS by removing the bucket. This is only one case where we could end up with a 0 bucket in ctx->b, but let's remove it and move on. (If the bucket were to return 0 bytes and still have data left to read on blocking mode, it's blantly broken, IMHO) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93270 13f79535-47bb-0310-9956-ffa450edef68
* In core_input_filter, check for an empty brigade afterJeff Trawick2002-02-051-4/+6
| | | | | | | | | APR_BRIGADE_NORMALIZE(). Otherwise, we can get segfaults if a client says it will post some data but we get FIN before any data arrives. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93262 13f79535-47bb-0310-9956-ffa450edef68
* Remove the install_transport_filters hook. The same function can beRyan Bloom2002-02-051-4/+5
| | | | | | | | | acheived with the pre_connection hook. I have added the socket to the pre_connection phase to make this possible. Reviewed by: Bill Stoddard git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93259 13f79535-47bb-0310-9956-ffa450edef68
* Reintroduce the create_connection hook. This hook is required to enableBill Stoddard2002-02-011-0/+44
| | | | | | | modules to completely take over all network i/o from the core. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93171 13f79535-47bb-0310-9956-ffa450edef68
* Now how did this slip by. Fixes a segfault. I tested this code, really...Bill Stoddard2002-01-301-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93091 13f79535-47bb-0310-9956-ffa450edef68
* This patch restores most of Ryan's patch (11/12/2001) to remove theBill Stoddard2002-01-291-12/+41
| | | | | | | | | | | | client_socket from the conn_rec. Diffs from Ryan's patch include: - rename the create_connection hook to install_transport_filters - move the point of invocation of the hook till after the call to after ap_update_vhost_given_ip to enable the hook to use vhost config info in its decision making. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93087 13f79535-47bb-0310-9956-ffa450edef68
* Don't let the default handler try to serve a raw directory. AtJeff Trawick2002-01-291-2/+5
| | | | | | | | | | | | | | | | | | best you get gibberish. Much worse things can happen depending on the OS. This can happen when autoindex isn't loaded. On AIX, I had a directory file which was reported to be 1536 bytes in size. mmap() failed so we went to the fall-back logic. The first read() got 624 bytes and the next read() got 0 (supposedly EOF). This confused us greatly, we kept allocating buffers and reading and exercised the paging space. Reviewed by: Bill Rowe git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93071 13f79535-47bb-0310-9956-ffa450edef68
* Remove the create_connection hook and put the client_socket back into theBill Stoddard2002-01-271-69/+11
| | | | | | | | conn_rec. The create_connection_hook has a design flaw that prevents it from making decisions based on vhost information. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93050 13f79535-47bb-0310-9956-ffa450edef68
* Performance improvement: incorporated the use of the newBrian Pane2002-01-271-10/+27
| | | | | | | | ap_add_input_filter_handle() and ap_add_output_filter_handle() functions for core filters git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93040 13f79535-47bb-0310-9956-ffa450edef68
* avoid a palloc of zero bytes so memory debuggers don't barfJeff Trawick2002-01-271-0/+9
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93038 13f79535-47bb-0310-9956-ffa450edef68
* Change ap_get_brigade prototype to remove *readbytes in favor of readbytes.Justin Erenkrantz2002-01-251-19/+10
| | | | | | | | | | | | | | | If you need the length, you should be using apr_brigade_length. This is much more consistent. Of all the places that call ap_get_brigade, only one (ap_http_filter) needs the length. This makes it now possible to pass constants down without assigning them to a temporary variable first. Also: - Change proxy_ftp to use EXHAUSTIVE mode (didn't catch its -1 before) - Fix buglet in mod_ssl that would cause it to return too much data in some circumstances git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93014 13f79535-47bb-0310-9956-ffa450edef68
* These changes are to allow caching of subrequests via a quick_handler.Ian Holsman2002-01-211-1/+1
| | | | | | | | | | | * Change SUBREQ_CORE so that it is a HTTP_HEADER (20) filter instead of a content filter (10) this allows subrequests to add content filters properly * Change subreq handling of 'handle-include' so that it splits/passes the brigade before the subreq is created. (This allows quick_handler to push content back from this phase) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92956 13f79535-47bb-0310-9956-ffa450edef68
* Make core_input_filter use the new apr_brigade_split_line function.Justin Erenkrantz2002-01-201-33/+12
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92944 13f79535-47bb-0310-9956-ffa450edef68
* Add AP_MODE_SPECULATIVE support to core_input_filterJustin Erenkrantz2002-01-201-2/+16
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92943 13f79535-47bb-0310-9956-ffa450edef68
* Input filtering prototype change: Socket blocking type should beJustin Erenkrantz2002-01-191-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | separate from the input filter mode type. We also no longer look at readbytes to determine the method of filter operation. This makes the use of filters more obvious and allows a wider range of options for input filters modes. To start with, the new input filter modes are: AP_MODE_READBYTES (no more than *readbytes returned) AP_MODE_GETLINE (old *readbytes == 0 case) AP_MODE_EATCRLF (old AP_MODE_PEEK) AP_MODE_SPECULATIVE (will be used in a future ap_getline rewrite) AP_MODE_EXHAUSTIVE (old *readbytes == -1 case) AP_MODE_INIT (special case for NNTP over SSL) The block parameter is an apr_read_type_e: APR_BLOCK_READ, APR_NONBLOCK_READ This also allows cleanup of mod_ssl's handling in the getline case. Reviewed by: Ryan Bloom (concept), Greg Stein (concept) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92928 13f79535-47bb-0310-9956-ffa450edef68
* Move a check for an empty brigade to the start of core input filterJeff Trawick2002-01-121-3/+4
| | | | | | | | | | | | | | to avoid segfaults. Using prefork MPM and APR_POOL_DEBUG and ElectricFence, I found a couple of paths where weren't able to report APR_EOF all the way back up the call tree, leading us back into core_input_filter with an empty brigade. Some of the paths in core_input_filter handled it, some didn't. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92835 13f79535-47bb-0310-9956-ffa450edef68
* Bring forward the FileETag directive enhancement from 1.3.23-dev.Ken Coar2002-01-111-0/+158
| | | | | | | | (Passes all 61 of the apache/etags.t test.) Bump MMN due to change to core_dir_config structure (new fields at end). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92830 13f79535-47bb-0310-9956-ffa450edef68
* Restore the apr_pool_clear calls to main.c in case we haveDavid Reid2002-01-081-1/+0
| | | | | | | | | | third-parties who are overriding the open_logs hook, in which case they'd miss the plog being cleared. Submitted by: Justin <jerenkrantz@apache.org> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92771 13f79535-47bb-0310-9956-ffa450edef68
* This small patch modifies the log's to use plog instead of pconf.David Reid2002-01-081-1/+2
| | | | | | | | | | | | | | | | | Basically pconf is cleared at different times from plog, and this has the effect of leaving stderr closed when going into the next stage of the config. This also had the effect of allowing FreeBSD with threads to create a pipe with stderr's fd at one end, and this resulted in problems with the signal polling and high cpu usage. In addition, move the clearing of plog from main.c to core.c where it seems more appropriate. This solves the first and main problem that FreeBSD has with the threaded MPM's. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92769 13f79535-47bb-0310-9956-ffa450edef68
* Fix LimitRequestBody directive by moving the relevant code fromJustin Erenkrantz2002-01-021-2/+6
| | | | | | | | | | | | | ap_*_client_block to ap_http_filter (aka HTTP_IN). This is the only appropriate place for limit checking to occur (otherwise, chunked input is not correctly limited). Also changed the type of limit_req_body to apr_off_t to match the other types inside of HTTP_IN. Also made the strtol call for limit_req_body a bit more robust. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92700 13f79535-47bb-0310-9956-ffa450edef68
* Remove a needless immortal bucket creation. We can just leave theJustin Erenkrantz2002-01-021-2/+0
| | | | | | | | | brigade as-is. Suggested by: Cliff git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92698 13f79535-47bb-0310-9956-ffa450edef68
* Generalized the recent prep_walk_cache optimizations to allow otherBrian Pane2002-01-011-2/+36
| | | | | | | | modules to register "notes" within the array of working data in the core_request_config git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92697 13f79535-47bb-0310-9956-ffa450edef68
* Performance fix for prep_walk_cache():Brian Pane2001-12-311-6/+7
| | | | | | | | | | | | Moved the directory/location/file-walk caches from the request's pool userdata hash table to the core_request_config struct. This change removes about 60% of the processing time from prep_walk_cache(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92684 13f79535-47bb-0310-9956-ffa450edef68
* avoid some ugly sockaddr comparisons in do_double_reverse() by usingJeff Trawick2001-12-271-15/+1
| | | | | | | apr_sockaddr_equal() git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92620 13f79535-47bb-0310-9956-ffa450edef68
* Change core code to allow an MPM to set hard thread/serverJeff Trawick2001-12-181-4/+4
| | | | | | | limits at startup. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92512 13f79535-47bb-0310-9956-ffa450edef68
* Whoops, that's quadstate, the value 3 is not-present.William A. Rowe Jr2001-12-131-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92460 13f79535-47bb-0310-9956-ffa450edef68
* As suggested by Josh Slive, add the explicit 'default' to AcceptPathInfo.William A. Rowe Jr2001-12-131-8/+22
| | | | | | | | I'll leave docs up to him. The conf becomes a quadstate (undef != default) but other than that, it should make things cleaner for the user. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92459 13f79535-47bb-0310-9956-ffa450edef68
* If dconf->accept_path_info is tristate, why not r->used_path_info?William A. Rowe Jr2001-12-131-7/+14
| | | | | | | | | This patch allows us to force path_info off in mod_cgi[d] etc, patch forthcoming. It also allows includes, php, etc to change the undefined value in the early handler or late fixup phases to Accept'ed. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92448 13f79535-47bb-0310-9956-ffa450edef68
* Now all should be well. AcceptPathInfo on will give us a document withWilliam A. Rowe Jr2001-12-131-0/+25
| | | | | | | | | | | | | | | | | path_info served from the core handler. Any filters can then manipulate all the usual CGI envvars [as proven with this little excerpt with a <!--#printenv --> document... <FilesMatch ".*\.shtml.*"> Options +Includes SetOutputFilter INCLUDES AcceptPathInfo on </FilesMatch> a potentially questionable config, but effective. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92444 13f79535-47bb-0310-9956-ffa450edef68
* Kill some redundancy (why test PUT when we disallow all but GET/POST?)William A. Rowe Jr2001-12-131-15/+14
| | | | | | | and add some thoughts. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92441 13f79535-47bb-0310-9956-ffa450edef68
* Periods aren't commas. Clear out some inappropriate casts whileWilliam A. Rowe Jr2001-12-131-2/+2
| | | | | | | we are at it. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92439 13f79535-47bb-0310-9956-ffa450edef68
* Whatever this was doing, it looks most unholy.William A. Rowe Jr2001-12-131-6/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92438 13f79535-47bb-0310-9956-ffa450edef68