Parent Directory
|
Revision Log
| Links to HEAD: | (view) (annotate) |
| Sticky Revision: |
Fix a lot of doxygen warnings. Thanks to Brad Hards for the patch. I added a few more fixes, and there are still more that might need a doxygen expert. PR: 48061 Submitted by: Brad Hards Reviewed by: poirier
* include/httpd.h: Fix comment implying that LimitRequestLine and LimitRequestFieldsize cannot raise limits -- no longer the case.
Enhance ap_hook_monitor to pass along a server_rec (in general the ap_server_conf) and tuck away some storage in there which may be useful as an opaque data pointer.
* Lower memory usage by reusing the brigade instead of constantly recerating one. Submitted by: Stefan Fritsch <sf sfritsch.de> Reviewed by: rpluem
Bring back OS/2 support. Reverses r758929 with a little bit of conflict resolution.
the only "retuned" in the entire server was, alas, not meant to be
remove OS/2 platform support
remove BeOS OS support
Add conn_rec::current_thread.
Disabled DefaultType directive and removed ap_default_type() from core. We now exclude Content-Type from responses for which a media type has not been configured via mime.types, AddType, ForceType, or some other mechanism. MMN major bump to NZ time. PR: 13986
Add support for escaping all non-ascii chars to ap_escape_html, and use it to fix PR#25202: encoding="entity" doesn't work as advertised in mod_include. For backport, this'll need an ABI-preserving version that'll be a minor MMN bump. But if we do that in /trunk/, it'll never change.
Merge mod_wombat from the wombat branch: <https://svn.apache.org/repos/asf/httpd/httpd/branches/wombat-integration> Into trunk.
Prevent AP_FILTER_ERROR from being misinterpreted as SUSPENDED when checking the status code returned by a handler by updating the values of the filter error macros and consolidating them in httpd.h
* Move ap_timeout_parameter_parse from mod_proxy.c to server/util.c and thus make it part of the public API.
Introduce Suspendable Requests to the Event MPM.
Using this basic framework, you can return SUSPENDED from an HTTP Handler,
and then register a callback that is invoked by the MPM at a later time.
This initial version only supports _timers_ as callbacks, but in the future I
would like to add things like wait for socket activity, on a socket specified by
the handler.
Once in a callback, It is then the responsibility of the callback fucntion
to finish the HTTP Request handling, but this alows you to do cool things like
a fully async proxy, COMET support, or even rate limiting.
To prove I'm not insane, I've inlcuded an example module, mod_dialup.
You can configure it like this:
<Location "/docs">
ModemStandard "V.32"
</Location>
And for static files inside that path, you will be rate limited to V.32 speeds,
aka 9.6 kilobits/second.
Does anyone besides Rüdiger read commit emails :-) ?
I know there are likely huge problems with this, but I would like to see how far
we can push the Event MPM, figure out what to do better, if there is anything,
and then really dive into the 3.0 development before ApacheCon.
* server/mpm/experimental/event/fdqueue.h:
(timer_event_t): New structure to hold timer events and callback functions.
* server/mpm/experimental/event/fdqueue.c
(ap_queue_empty): Modify to also look at Timer Ring.
(ap_queue_init): Initialize Timer Ring.
(ap_queue_push_timer): New function, pushes a timer event into the queue.
(ap_queue_pop_something): Renamed function, returns a timer event or
a socket/pool for a worker thread to run.
* server/mpm/experimental/event/event.c
(process_socket): If the connection is in SUSPENDED state, don't force it
into linger mode yet, the callback will have to take care of that.
(push_timer2worker): New shortcut function, pushes timer event into queue
for a worker to run.
(timer_free_ring): New global data structure to recycle memory used by
timer events.
(timer_ring): New global data structure to hold active timer events.
(g_timer_ring_mtx): Thread mutex to protect timer event data structures.
(ap_mpm_register_timed_callback): New Function, registers a callback to be
invoked by the MPM at a later time.
(listener_thread): Calculate our wakeup time based on the upcoming Event
Queue, and after pollset_poll runs, push any Timers that have passed
onto worker threads to run.
(worker_thread): Call new queue pop method, and if the Timer Event is
non-null, invoke the callback. Once the callback is done, push the
structure onto the timer_free_ring, to be recycled.
(child_main): Initialize new mutex and ring structures.
* server/config.c
(ap_invoke_handler): Allow SUSPENDED aa valid return code from handlers.
* modules/http/http_core.c
(ap_process_http_async_connection): Don't close the connection when in
SUSPENDED state.
* modules/http/http_request.c
(ap_process_request_after_handler): New function, body pulled from the old,
ap_process_async_request. Split to let handlers invoke this so they
don't need to know all of the details of finishing a request.
(ap_process_async_request): If the handler returns SUSPENDED, don't do
anything but return.
* include/ap_mmn.h: Bump MMN.
* include/ap_mpm.h
(ap_mpm_register_timed_callback): New function.
* include/httpd.h:
(SUSPENDED): New return code for handlers.
(request_rec::invoke_mtx): New mutex to protect callback invokcations
from being run before the original handler finishes running.
(conn_state_e): Add a suspended state.
* include/http_request.h
(ap_process_request_after_handler): New function to make it easier for
handlers to finish the HTTP Request.
* modules/test/config.m4: Add mod_dialup to build.
* modules/test/mod_dialup.c: New rate limiting module, requires the Event MPM
to work.
The response to the TRACE method is partially garbled on an EBCDIC platform. Send the request line and trailing CRLF in ASCII. Submitted by: David Jones <oscaremma gmail.com> Reviewed and tested by: gregames
Remove CORE_PRIVATE. This define serves no modern purpose, since every module in the wild, including our own define it, for no purpose. If you have functions which you do not want in the 'public' API, put them in a private header, that is not installed, just like mod_ssl does.
Rename the ap_escape_path_segment_b function as suggested by Ruediger Pluem, and make a corresponding minor bump.
mod_session: Add a generic session interface to unify the different attempts at saving persistent sessions across requests.
core: Add the option to keep aside a request body up to a certain size that would otherwise be discarded, to be consumed by filters such as mod_include. When enabled for a directory, POST requests to shtml files can be passed through to embedded scripts as POST requests, rather being downgraded to GET requests.
Add "DefaultType None" option PR 13986 and PR 16139
Fixup style nitpicks: - Empty lines should not have spaces - Declare static functions in http_core.c at the top.
Add a clogging_input_filters variable to the conn_rec, enabling the Event MPM to know when its running with an input filter that buffers its own data, like mod_ssl.
Generic fix for PR#31759 If a handler returns a value that is neither reserved nor a valid HTTP response code, log an error and substitute HTTP_INTERNAL_SERVER_ERROR. Allow a handler to override this explicitly by setting a note.
Replace ap_get_server_version with ap_get_server_banner() and ap_get_server_description(). High-level summary: The full server version information is now included in the error log at startup as well as server status reports, irrespective of the setting of the ServerTokens directive. Third-party modules must now use ap_get_server_banner() or ap_get_server_description() in place of ap_get_server_version().
update license header text
Add optional 'scheme://' prefix to ServerName directive. For
'https', mod_http returns "https" for the ap_hook_http_scheme and
DEFAULT_HTTPS_PORT for ap_hook_default_port. This fixes Redirect
responses to requests for directories without a trailing slash
when httpd runs behind a proxy or offload device that processes
SSL. It also enables support for Subversion in that
configuration. This change is completely backwards compatible
and passes the perl-framework. Minor mmn bump because I add a
field to server_rec.
Update the copyright year in all .c, .h and .xml files
Revert the refactoring of the request read code
Refactoring of ap_read_request() to store partial request state in the request rec. The point of this is to allow asynchronous MPMs do do nonblocking reads of requests. (Backported from the async-read-dev branch)
* include/httpd.h (conn_state_e): Remove trailing comma from enum. Submitted by: Per Olausson <pao darkheim.freeserve.co.uk> PR: 37840
New version of ap_core_output_filter that does nonblocking writes (backport from async-dev branch to 2.3 trunk)
Add new connection states for handler and write completion (backport from async-dev branch to 2.3 trunk)
Add ap_append_pid(); This is performed enough to warrant a function I think, especially with the fact that the mapping of getpid() to APR_PID_T_FMT isn't consistant in some areas.
Doxygen fixup / cleanup submited by: Neale Ranns neale ranns.org reviewed by: Ian Holsman
As discussed on the list, change the default setting for KeepAliveTimeout from 15 seconds to 5 seconds.
*) include/httpd.h: Add a brigade for temporary uses in the core input filter context. *) server/core_filters.c: Do not use brigade_split, since it allocates a new brigade. Instead move buckets to our tmpbb, and reuse the tmpbb for every call. PR: 33382
* include/httpd.h: Fix a comment.
* include/ap_regex.h: Include apr.h not stdlib.h; replace pointless regoff_t typedef with int; s/size_t/apr_size_t/;. Comment fixes. * server/util_pcre.c: s/size_t/apr_size_t/. * include/httpd.h: Include stdlib.h here instead since many other files assume it was included by httpd.h at some point.
Move the POSIX reg* implementations into the ap_* namespace; internalise the ap_reg*<->PCRE wrapper: * configure.in: Add srclib/pcre to the include path. * include/ap_regex.h: Renamed from include/pcreposix.h. Prefix all constants with AP_; prefix all functions and types with ap_. Define AP_DECLARE to nothing if necessary. Remove regcomp error codes. * include/httpd.h: Include ap_regex.h not pcreposix.h. (ap_pregcomp, ap_regexec, ap_regfree): s/regex_t/ap_regex_t/. (ap_regexec, ap_regerror): Prototypes moved to ap_regex.h. * server/util.c (regex_cleanup, ap_pregcomp, ap_pregsub, ap_pregfree): Adjust for ap_ prefixed types. (ap_regexec, ap_regerror): Removed. * server/Makefile.in: Build util_pcre.c. * server/util_pcre.c: Copied from srclib/pcre/pcreposix.c; remove use of PCRE-internals to do error mapping; rename types to add AP_/ap_ prefixes as above. Use APR includes. (ap_regerror): Use apr_snprintf. * srclib/pcre/Makefile.in: Don't build pcreposix.c into libpcre.la. * modules/*: Update to use new type and constant names. PR: 27750 (part one) Submitted by: Andres Salomon <dilinger voxel.net>, Joe Orton
Update copyright year to 2005 and standardize on current copyright owner line.
FINALLY Correct ap_http_method()! It is NOT a method, it's a SCHEME! Bumped mmn, and ap module cookie, for this function rename. It's not a deprecation, as ap_http_method would be a lovely function name sometime in the future: to determine what the function name implies.
undo changes made in 111386 due to veto
add response code 226 constant (HTTP_IM_USED) and status
line ("226 IM Used"). PR 31128.
Revert my patch of this a.m. while I work out all the potential forward declaration pitfalls.
Usage was inconsistent with the rest of ap_filter_t examples; we always presume the typedef'fed flavor of such symbol names.
general property cleanup
The Event MPM. Designed to minimize Apache's KeepAlive overhead. This MPM depends on the current APR-trunk for new features added to the apr_pollset interface. Currently the underlying operating system must support KQueue or EPoll. Status: Should work as a drop in replacement for all non-ssl servers. SSL Requests that use HTTP 1.1 Pipelining do not currently work. Testing: I have tested it with Linux 2.6, FreeBSD 5.2.1, and OS X 10.3. Originally based on the patch by Greg Ames.
veto and revert win64 patch: 64bit changes must percolate from the bottom (APR/system) up -- we can't give the client a 64bit API and then cast it to 32bits internally without introducing security holes on other platforms.
WIN64: API changes to clean up Windows 64bit compile warnings
correct struct fields comments PR: Obtained from: Submitted by: Reviewed by:
Added 'AllowOverride Options=Indexes,MultiViews' to give an admin better control over what options can be used in .htaccess files. PR: 29310 Submitted by: Tom Alsberg <alsbergt-apache cs.huji.ac.il>
* include/httpd.h: Double DYNAMIC_MODULE_LIMIT, httpd alone includes about 60 modules already.
fix name of The Apache Software Foundation
fix copyright dates according to the first check in
apply Apache License, Version 2.0
Add core version query function ap_get_server_revision and accompanying ap_version_t structure (minor MMN bump). The function is similar to apr_version() and allow for exact querying of the core revision level.
update license to 2004.
fix docco
SECURITY [CAN-2003-0020]: escape arbitrary data before writing into the errorlog. Reviewed by: Mark J Cox
fix comment Submitted by: Fitz
- add XHTML doctypes to httpd.h - fix the (x)html output of mod_autoindex to be consistent and make it configurable to emit either HTML or XHTML PR: 23747
Fold in the CAN-2003-0542 regex patch.
fix misleading ap_get_token description
Use 'expected' rather than 'exp', as the latter shadows the exp() function in the math.h header. Some compilers don't like that. Submitted by: Blair Zajac <blair@orcaware.com> Reviewed by: rbb@rkbloom.net
Porting to BS2000: the antique interface (BS2000Account) no longer exists
Minor MMN bump: Forward port: Escape special characters (especially control characters) in mod_log_config to make a clear distinction between client-supplied strings (with special characters) and server-side strings. This was already introduced in version 1.3.25. Obtained from: Patch in 1.3.25-dev by Martin
* include/http_config.h
(ap_get_module_config, ap_set_module_config): Always declare.
* include/httpd.h
(ap_strchr, ap_strchr_c, ap_strrchr, ap_strrchr_c, ap_strstr, ap_strstr_c):
Always declare.
* server/util_debug.c
(ap_get_module_config, ap_set_module_config, ap_strchr, ap_strchr_c,
ap_strrchr, ap_strrchr_c, ap_strstr, ap_strstr_c):
Always implement and export.
finished that boring job: update license to 2003. Happy New Year! ;-))
here we go. add a directive that will keep %2f from being decoded into '/', allowing the *_walk to do their magic and return 404 if it's in the path, and allowing it in the path-info.
move rfc1413 code to a new module "metadata:mod_ident". The rfc1413 code itself is mostly c&p, but can still bear some rework ... This patch removes the global ap_rfc1413 function and the ap_rfc1413_timeout variable. It also introduces a new config directive IdentityCheckTimeout (default 30 sec). Reviewed by: Justin Erenkrantz
use a subpool of c->pool for resources which are set aside, then clear it after writing the data to the network. This closes files sooner with keepalive connections.
Fix a compile of compiler warnings. I don't know how these slipped past. Also, uncomment a line of code that the last commit should have uncommented. Randall found this line and the fix, but I forgot to uncomment this line along with the fix.
Bring in os.h after we let apr do its platform foo.
Change conn_rec->keepalive to an enumerated value of AP_CONN_UNKNOWN AP_CONN_CLOSE AP_CONN_KEEPALIVE This also fixes a problem where ap_discard_request_body would not discard the body when keepalive was 0. This actually meant the keepalive status was unknown *not* closed, but no one ever remembered that. This problem was seen with mod_dav sending error responses (as reported by Karl Fogel). Suggested by: Greg "this isn't the '80s" Stein Reviewed by: Greg Ames
Removed "tolower(++s)" idiom from ap_strcasestr(), to avoid side-effects on any platform with a macro-based tolower() that references its argument multiple times.
Improve on some of the documentary comments in the request_rec.
Solve the 80/20 by initializing and storing server_rec->timeout and server_rec->keep_alive_timeout in apr_time_interval_t format (in apr units, whatever they be), as both values exist to pass into APR, and all APR timeouts are in apr_time_t. Reviewed by: Cliff Woolley
Add a PROXYREQ_RESPONSE value for request_rec->proxyreq because it is possible that there can be different behavior at the protocol level if request_rec isn't really a request but a response. This stems from the fact that request bodies must be indicated by Content-Length or Transfer-Encoding, but response bodies do not. The recent change to ap_http_filter to return EOS if there isn't a body broke proxy. Therefore, there must be some way for the proxy to indicate that this is a response. Accordingly, ap_http_filter can allow the BODY_NONE iff this is a response. Since r->proxyreq is set to PROXYREQ_PROXY even for the original request from the client, that value isn't sufficient. Hence, the introduction of PROXYREQ_RESPONSE.
Rewrite ap_byterange_filter so that it can work with data that does not have a predetermined C-L - such as data that passes through mod_include. Previously, these requests would generate 416 since when the byterange filter ran, r->clength would be 0. r->clength is only guaranteed to be valid after C-L filter is run, but we need C-L to run after us so that our data can have a proper C-L returned. So, we need to rearrange the code so that we can deal with this case. Highlights: - Remove r->boundary since it is possible to have this self-contained in boundary's ctx. (May require MMN bump?) - Remove call to parse_byteranges in ap_set_byterange since this would wrongly return -1 for dynamic responses. We have to wait until we see EOS to call parse_byteranges. - Move bound_head computation inside the num_parts == 2 check. - Change a NULL brigade check to APR_BRIGADE_EMPTY - Move the 416 error return to after we've run through all ranges and found none of them to be valid.
BUCKET FREELISTS Add an allocator-passing mechanism throughout the bucket brigades API. From Apache's standpoint, the apr_bucket_alloc_t* used throughout a given connection is stored in the conn_rec by the create_connection hook. That means it's the MPM's job to optimize recycling of apr_bucket_alloc_t's -- the MPM must ensure that no two threads can ever use the same one at the same time, for instance.
The underlying change here was to add the new WebDAV/DeltaV methods now that it has an RFC. At the same time, I revamped a good chunk of the name <-> number mapping code in http_protocol.c * add M_FOO constants for the new RFC 3253 (DeltaV) methods. label where each of the builtin methods comes from. * moved METHOD_NUMBER_FIRST/LAST from http_protocol.h into http_protocol.c since they weren't used anywhere else and they weren't namespace-protected. * create register_one_method() and use it to insert all builtin methods (at _init() time) and extended methods into the registry. * add a lookup_builtin_method() to quickly map a method name to a builtin method number. * rebuild ap_method_number_of() to use the new lookup function. * revamp ap_method_name_of() to use the registry to locate the name for any method number. add a pool argument (no callers in the core code needed to be updated) * revamp make_allow() to deal with the new method numbers and all extended methods. * in mod_dav, use the new method numbers rather than registering the DeltaV methods.
Update our copyright for this year.
Fix the mod_dir/mod_negotiation bug, where redirects and sub requests were not getting the correct filters. This is done by creating a location in the request rec that holds protocol level filters. Protocol level filters survive for one request, from the time the request is received from the user to the time the response is sent. r->output_filters now stores the request level filters, which are only valid for the lifetime of one request_rec. This patch works, but it is not complete. The second half of the problem is that add_any_filter doesn't check where it puts the filters that it adds, so it is possible for filters to be put on this wrong list, and for filters to be lost completely during request processing. That half of the fix will be coming in the next day or so. Submitted by: Will Rowe, Justin Erenkrantz, Ryan Bloom
Fix the close-on-sendfile bug where Win32 would transmit a single sendfile bucket and then lose it's socket, and fix a comment. Submitted by: Ryan Morgan <rmorgan@covalent.net>
if a child detects a resource shortage on accept(), limit the rate of fork()s to 1 per second until the situation clears up. Inspired by: Martin Kraemer
This patch restores most of Ryan's patch (11/12/2001) to remove the 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.
Remove the create_connection hook and put the client_socket back into the conn_rec. The create_connection_hook has a design flaw that prevents it from making decisions based on vhost information.
Change core code to allow an MPM to set hard thread/server limits at startup.
As suggested by Josh Slive, add the explicit 'default' to AcceptPathInfo. 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.
Give the request_rec some information about path_info allowance. If some unnamed filter will consume the path_info, it may set up used_path_info to a non-zero value, and core.c will consume the request with path_info.
use our standard declaration macro for the AP_DEBUG flavors of ap_strchr(), ap_strchr_c(), et al so that for an AP_DEBUG build of Apache those functions will be listed in httpd.exp... otherwise, AIX DSO modules also compiled with AP_DEBUG won't be able to resolve those symbols since httpd isn't exporting them
Fix the timeout logic that I broke last week. This adds a request level filter that sets the timeout on the socket that is connected to the client. Thanks Greg Stein for seeing this bug.
Begin to abstract out the underlying transport layer. The first step is to remove the socket from the conn_rec, the server now lives in a context that is passed to the core's input and output filters. This forces us to be very careful when adding calls that use the socket directly, because the socket isn't available in most locations.
adjust for the change to SuExec's default install directory
Goodbye r->content_lanaguage (per vote from apache-1.3/STATUS).
Added Doxygen Comments With these 2 changes most of the Doxygen warnings go away. (these patch just modifies comments/slight moves in typedefs, no other changes)
Added the HTTPD_ROOT path for NetWare
I think this statement makes more sense, please ask if it isn't clear.
Add a canonical_filename value (should remain the r->filename identity) so we can tell if a 3rd party module broke the canonical form of the filename by not calling apr_filepath_merge().
Eliminated ap_os_[systemcase|[case_]canonical]_filename() and move ap_os_is_path_absolute() into util.c (now relies on apr.)
adjust to apr_uri_ rename
the 2nd parm to strstr() doesn't lose const-ness, unlike the 1st parm; thus, AP_DEBUG flavor of strstr() should declare 2nd parm as const char *, not char *; this eliminates a warning in mod_ssl-land
fix some homophonic issues in comments, as well as some mispelings found near "its" or "it's" (helping our 4th grader with homework, couldn't help but grep)
Fix the new method code. We need to cast 1 to an apr_int64_t or it will be treated as a 32-bit integer, and it will wrap after being shifted 32 times. Submitted by: Cody Sherr <csherr@covalent.net> and Ryan Morgan <rmorgan@covalent.net>
Add the ability to extend the methods that Apache understands 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>
Change the length of the content args to apr_off_t identifiers, and fix mod_negotation to treat a size of -1 and indeterminate, instead of 0.
Cliff's most sane advise :-)
This same patch is needed in mod_asis and others, I'm testing the waters for this solution. I'm easily convinced to choose AP_MAX_SENDFILE based on any reasonable argument, provided it's smaller than 2^30 :-)
First pass at the pipe_of_death logic for the prefork MPM. This does pass some initial testing, but it needs to be banged on more. It looks like if the server gets a lot of requests to restart all at once, there are potential problems, but other than that this does seem to solve our current restart issues.
Doxygenation.
Moved util_uri to apr-util/uri/apr_uri, which means adding the apr_ 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
Removed the keptalive boolean from conn_rec because it is now only used by a single routine and can be replaced by a local variable. Submitted by: Greg Stein, Ryan Bloom, Roy Fielding
At the hack-athon we decided to change the way that input filters 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.
Revert the change that moved keepalives out of conn_rec. That variable controls the number of requests per connection, regardless of the protocol used by the request.
Move the keepalives field out of the conn_rec and into an HTTP specific connection record. This also moves some HTTP specific back out of the core and into the HTTP module.
Silly typo.
Whoops... this could be causing problems
Tweak some declarations so they're picked up by make_export.awk
This is a fix that went into v1.3 quite a while back, but not into v2.0. 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
More doxygenation.
First step in doxygen conversion.
Fix a compile break on OS/2, by adding apr_general.h back to httpd.h. Submitted by: Brian Havard <brianh@kheldar.apana.org.au>
Namespace protect IOBUFSIZ since it is a public symbol. Submitted by: Jon Travis <jtravis@covalent.net>
*) Introduce "ap_conf_vector_t" type to assist with legibility and provide some type safety. (unfortunately, our old "void*" is type-safe with the new one, but over time we should be better) *) Propagate the new type to all appropriate functions. *) Random cleaning, whitespace, stylistic nits.
Update copyright to 2001
string.h needs to be included before monkeying around with strchr et al,
since some system header files do their own monkeying around with those
functions in ways that don't get along with us unless we include their
definitions first
examples: gcc 2.8.1 on Solaris
gcc 2.95.2 on AIX
*) remove some obsolete/unused defines from httpd.h. *) remove DEFAULT_XFERLOG from main.c; it is never set/used *) move ap_get_max_daemons() to ap_mpm.h *) move DEFAULT_LISTENBACKLOG to mpm_common.h
I hereby propose that the ASF buy that guy a compiler.
Move the APACHE_RELEASE macro to release.h
Move the server version information out of httpd.h and into release.h. This is in preparation of the first tag with the new tag and release strategy.
Move initgroupgs, ap_uname2id and ap_gname2id from util.c to mpm_common.c. These functions are only valid on some platforms, so they should not be in the main-line code. These functions are also not portable to non-unix platforms, so they don't really belong in APR. Since they are only used in MPMs, for right now, I am moving them to mpm_common.c
Remove ap_chdir_file. This function is not thread-safe, and nobody is currently using it. The proper way to do this, is to use the apr_create_process API.
add pool parameter to ap_is_directory and ap_is_rdirectory
Switch to the APR-provided APR_CHARSET_EBCDIC feature test macro.
Force all Apache functions to be linked into the executable, whether they are used or not. This uses the same mechanism that is used for APR and APR-util. This may not be the correct solution, but it works, and that is what I really care about. This also renames CHARSET_EBCDIC to AP_CHARSET_EBCDIC. This is for namespace correctness, but it also makes the exports script a bit easier.
move closer to IPv6 support by changing the server_addr_rec representation of the bound address to something which handles IPv6; this also allows us to switch to APR resolver routines in places instead of calling gethostbyname() and gethostbyaddr() directly Issues remaining with this set of changes: 1) apr_snprintf()'s %pA formatting needs to change to take apr_sockaddr_t * instead of sockaddr_in * -OR- just get rid of that type of formatting 2) apr_get_inaddr() is no longer used and should be removed
Axe ap_get_virthost_addr(). This <address>[:port] parse routine is not used anymore and it doesn't handle IPv6, so it is best to drop it. If/when mod_tls (Netware) is ported to 2.0 it can use apr_parse_addr_port().
The local_addr and remote_addr fields in the conn_rec are now apr_sockaddr_t * instead of sockaddr_in. This is a small step towards IPv6 support.
Get the server setup for Beta 1
Update the version numbers for a9
Fix a couple of small typo's Not raining today...
Use "const char * const *" for process->argv (which is the correct const-ness since we sometimes put "some string" in there, and also the CRT's argv). propagate this change within http_main and mpm/winnt/ (also correct some other const type usage within the MPM). fix ab's call to parse_url() which removed a const to actually manipulate an arg from the CRT's argv (indirectly via opt->arg). no idea how this has avoided segfaulting.
*) Compensate for recent changes in the APR headers. Specifically, some files need to specifically include stdio.h, or a particular apr_*.h header. *) Adjust callers of apr_create_process() to deal with the extra "const" *) Add "const" to args of ap_os_create_privileged_process()
We are working on a9 now.
Get the version number bumped to 2.0a8
Bring the apr_in_addr type into line with naming conventions and make changes where appropriate. At least on my system virtual hosts seem to still work :)
Remove BUFF from the main server. :-) The buff code needs to remain as a part of the server until the proxy is purged of BUFF however.
Start of moving to apr_port_t in the server code. This will probably the first of a few...
fix the byterange filter. there is still some bogosity in there (huge buffer allocs!), and some optimizations to be made, but this appears to fix byterange handling.
Use apr_off_t for the content length, rather than long. Propagate through the byterange handling and ap_set_content_length(). [ ap_each_byterange() remains as an apr_size_t* so we don't mess up callers ]
Remove REQUEST_CHUNKED_PASS and change ap_discard_request_body() to use REQUEST_CHUNKED_DECHUNK. Because of this change, the need for handle_request_body() is gone, so we remove that as well.
Comment fixes.. just to get them out of my tree
Get rid of some outdated character set translation cruft.
Add back suexec support.
somebody was a Very Bad Boy when they inserted casts into this function. casting away the const was absolutely wrong... the warnings were saying the return value type needed to be fixed. did that and torched the casts. who still thinks casts are a good idea? :-)
This begins to remove BUFF from the server. The idea is to go very slowly with this. To begin with, we store both the socket and the BUFF in the conn_rec. Functions are free to use which ever they want, in the end all of the data goes to the same place. This modifies all of the MPMs except Windows. All of the Unix MPMs are working, but the others need to be tested.
Capitalize AP_DEBUG_ASSERT(). All macros should shout, even if their forbearers (e.g., ap_assert()) did not. Submitted by: Greg Stein
Get rid of some old code related to the way that character set translation of protocol data and bodies was performed in the past.
Renamed all MODULE_EXPORT symbols to AP_MODULE_DECLARE and all symbols for CORE_EXPORT to AP_CORE_DECLARE (namespace protecting the wrapper) and retitled API_EXPORT as AP_DECLARE and APR_EXPORT as APR_DECLARE. All _VAR_ flavors changes to _DATA to be absolutely clear. Thank you Greg, for the most obvious suggestion.
Get non-chunked input body filtering working with an EOS bucket. The basic design has ap_setup_client_block setting a field in the conn_rec which tells http_filter how much data is in the body (with chunking this will represent how much data is in the chunk). The ap_get_client_block then calls down the stack with the maximum amount of data that it can receive back. When http_filter reads all of the data, it adds an eos bucket to the end of the brigade. ap_get_client_block continues to read data until it gets the eos bucket. This allows filters to increase the size of the body data.
Introduce ap_debug_assert() macro, like ap_assert() but only active if AP_DEBUG is defined. ap_get_client_block(): . avoid some cases where we leak a temporary bucket brigade . clean up/fix the logic to copy a brigade into the caller's buffer; the wrong length was used in some cases . add an AP_DEBUG-only assertion for some assumptions made regarding the brigade returned by the filters Submitted by: partly by Greg Stein, but of course anything bad is mine
Modify ap_make_dirstr_prefix, platforms with HAVE_DRIVE_LETTERS or NETWARE can request 0 elements, returning the '/' root. [William Rowe, Tim Costello] from 1.3, with documentation
Implement a length argument on input filters. There are three possible values for the length, -1, 0, and a positive number. -1 means that the next filter should return all the data it has, the current filter will take care to ensure that the protocol is followed. Most filters will never use this, because it implies they are implementing a conn_based input filter. 0 means give me exactly one line of data. A positive number means give me a maximum of n bytes.
We never actually store anything in input_data (from the conn_rec), so it doesn't make much sense to check to see if there is something there. This removes the input_data brigade from the conn_rec altogether. There is no good reason for a filter to be accessing a bucket brigade from within the conn_rec. This shouldn't be here anymore, just like the output_filter shouldn't be storing the data in the conn_rec.
Back out the change to move the core_output_filters brigade to the conn_rec. Since all requests on a given connection use the same core_output_filter, the ctx in that filter has the correct lifetime
Update some docs httpd.h
Update the version for 2.0a8-dev
The core filter should not be using its own brigade inside its own ctx structure. This changes the core_output_filter to use a brigade inside the conn_rec. Think of this as analagous to the BUFF in the conn_rec. The idea is that if we have pipelined requests, and it isn't worth it to send the last bit of data from the first request, we want to save that extra bit of data to the conn_rec, so that the next request sends it automatically.
The newest incarnation of http_filter. This is far from perfect, but it is a step in the right direction. The idea is that the http_filter knows about the http protocol. So, it uses that knowledge to discover HTTP request headers, and sends those headers up to getline. However, it keeps the request body saved in it's ctx pointer. Later, when ap_get_client_block is called, we have set the remaining field in the conn_rec. This tells the http_filter how much of the remaining data is request body, and how much isn't. So, the http_filter can return the request body unparsed up throught ap_get_client_block. This doesn't even try to work with chunked input data, and there are still some other bugs in it, but it works for small-ish files in my tests, and it lets other people play with the concept of input filters. I will try to play with this more, but others should feel free to hack around in it too.
Port over the config directory stuff...
Add a bit of infrastructure which will be needed for input filtering: 1) separate filter lists hanging off the r and the c requests start off with the same filter list as the connection the input filter list is not initialized for subrequests internal redirects start off with the same filter list as the connection 2) AddInputFilter directive (blatant rip-off of Ryan's AddOutputFilter directive); as with AddOutputFilter, the network is implicitly to the right of the specified filter list; this may not be the most intuitive way to specify the filters; not sure yet
Get rid of much of the old implementation of translating the charset of response bodies. ap_checkconv() is removed, except for in os/bs2000 and os/tpf. (Anything there is questionable for 2.0 anyway.)
Connection oriented filters are now stored in the conn_rec instead of the request_rec. This means that a conn_rec must be supplied when calling ap_add_filter. The reason for this change is that we need to be able to add the core_filter (whether or SSL or not) before we try to read the request. This way, if a request fails, we can actually send the error page back to the client. With this change, we add the core filter to the conn_rec during the pre-connection phase. Submitted by: Ryan Bloom, Jeff Trawick, and Greg Ames
Implement input filtering. This is definately not completely correct, but it is a good first step. It is possible to add filters when reading from the client with this change.
tart getting things setup for input filtering. All this basically does 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.
Change r->filters to r->output_filters. This sets things up for us to put input filters into Apache.
Start introducing the extension-method elements so we're not 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.
Ensure that only one EOS bucket is sent down the filter stack. This is done by adding a flag to the request_rec. When ap_pass_bucket sees an EOS bucket, the flag is set. If the flag is still unset when ap_finalize_request is called, then ap_finalize_request sends an EOS. This fixes the problem with chunking and CGI.
Fix default Timeout & KeepaliveTimeout. Still need to limit directive values to prevent integer microsecond overflow.
Another minor cosmetic fix, committed from the httpd-docs-2.0/apidoc tree.
Cosmetic fix, committed from the apache-2.0 tree (this will also test the CVS module association).
Advance all the numbers in the CHANGES and httpd.h file to reflect that we are now working on a7.
Update httpd.h for the release of a6.
finish cleaning up after a change i made over 3 years ago.
Fix a small typo
Finish commenting httpd.h using Scandoc.
Initial Filtering code. This uses a bucket brigade scheme to allow modules 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
Note the connexion between the method number list and the ap_method_name_of() routine. (This should have been included as part of that commit but wasn't, alas.)
Add support for arbitrary extension methods for the Allow response header field, and an API routine for modifying the allowed list in a unified manner for both known and extension methods.
Fix comment delimiters so that Apache builds again.
Begin to document httpd.h with ScanDoc
Finish (almost) Ryan's change of apr_filter_t back to ap_filter_t so that apache builds again. AFAICT, there is one last occurrence of apr_filter_t in ryan.patch.
Bump the numbers since a5 has been tagged already
Update the version number for the new alpha release
prefix libapr functions and types with apr_
Move the Server Token stuff out of http_config_globals.h because it is now isolated in http_core.c
Add the ability to register filters. This commit introduces a warning into the build. This warning will be removed automatically, as soon as we decide on a prototype for the function causing the warning. That decision is tied to which filtering mechanism we decide on. Submitted by: Ryan Bloom and Greg Stein
Remove ap_get_server_conf() from the MPM's that implement. The only place this function was ever called was inside the MPM's, and not all of the MPM's actually had the function. This is part of another round of common code clean-up.
Fix a couple of const warnings on Linux. This basically just defines ap_strstr and ap_strstr_c, which make sure that things are const when they need to be.
blast the old names for the status codes
#undef strchr and strrchr when in maintainer mode. This keeps us from getting a lot of warnings on platforms that use macros for these functions.
Removed the pointless ap_is_aborted macro.
Add notes field to conn_rec
More consification, correct command initialisation.
Command handler revamp. Note that this makes the code produce a LOT of warnings!
Remove a bunch of string functions from Apache. These are basically standard string functions like strstr, strcasecmp, etc that Apache used to define for platforms that don't have them. These functions and the feature tests have moved down to APR where they really belong. In doing this, I am also able to remove a bunch of tests from the Apache configure process.
Fix a warning and a bug from the server_token commit. Submitted by: Eric Cholet <cholet@logilune.com>
Add server tokens back to 2.0. Also bring forward the change to allow the PRODUCT_ONLY value for ServerTokens. This is relatively clean, all of the code lives in http_core, and when a module wants to add a token, they just call ap_add_version_component from the post_config hook. Actually ap_add_version_component can be done anytime after the config has been parsed, it just makes the most sense to do it in post_config IMHO.
on a5 now.
2.0a4
APACHE_XLATE, when doing translation that isn't single-byte-only We must zap the Content-length header (if any). Otherwise, the browser will be seriously confused :) The header is zapped in ap_set_keepalive() right before we look for Content-length, transfer encoding, HTTP level, etc. to decide, among other issues, whether or not to turn on chunked encoding. For HTTP 1.1, if we don't send Content-length, we need to use chunked encoding, so we have to zap the header before that decision. Interestingly, in Russian Apache the Content-length header is zapped after ap_set_keepalive() is called, so with HTTP 1.1 they break the content-length-or-chunked rule.
Remove a warning when compiled with --use-maintainer-mode. Basically, process_rec should just be storing argv the same way that getopt expects it.
PR: Obtained from: Submitted by: Reviewed by: Remove any possiblity of having multiple tags to correct as the version changes. Split httpd.h's version into tokens. Roll these tokens into registry.c TODO: Remove registry.c from the list of files to touch when rolling
PR: Obtained from: Submitted by: Reviewed by: Reverse out all _EXPORT_VAR changes back to their original _VAR_EXPORT names for linkage (API_, CORE_, and MODULE_).
This patch corrects the issues from the AP_EXPORT and linkage
specification arguments to the ap_hooks.h declarations. As with
the APR_ and AP_ patches, API_VAR_EXPORT becomes API_EXPORT_VAR,
and MODULE_VAR_EXPORT becomes MODULE_EXPORT_VAR.
I will be happy to revert the inclusion of ap_config.h from
httpd.h if this bothers anyone. More individual modules need
to be patched if we do so.
The API_EXPORTs all moved into central storage in the ap_config.h
header. Without WIN32 or API_STATIC compile time declarations,
these macros remain no-ops.
This patch also moves the following data from http_main to http_config:
const char *ap_server_argv0;
const char *ap_server_root;
ap_array_header_t *ap_server_pre_read_config;
ap_array_header_t *ap_server_post_read_config;
ap_array_header_t *ap_server_config_defines;
And the following variables had already moved into ap_hooks.c:
ap_pool_t *g_pHookPool; (initialized now in http_config)
int g_bDebugHooks; (out of http_config)
const char *g_szCurrentHookName; (out of http_config)
The changes to http_main.c are in preparation for that module to
move out to a seperate .exe for win32. Other platforms will be
unaffected, outside of these changes.
include translation information in the request_rec; finish converting ap_bsetflag(B_ASCII2EBCDIC or B_EBCDIC2ASCII) to ap_bsetopt(BO_WXLATE or BO_RXLATE)
Replace hsregex with PCRE. The PCRE library is always used in 2.0, regardless of what system we are on. Currently, we are using the POSIX wrappers that PCRE provides.
Update the version string for the current dev version.
Update version information for 3rd alpha.
clean up cmd_parms: config_file is no longer valid; end_token is bogus;
add directive.
move configfile_t and functions from httpd.h to http_config.h
new signature for ap_build_config() (since config_file removed from cmd_parms)
add "data" to ap_directive_t for future use by modules. add filename.
syntax checking for section-close directives: a section-open must exist,
the section-close must be </FOO>, and the open/close must match.
the file as a whole must be properly balanced (issue errors for each
unmatched section-open).
</FOO> command_rec structures are obsolete. Remove from http_core.c.
do not store </FOO> directives in the config tree.
clean out section-close logic from http_core.c (and old, related comments)
<Limit> and <LimitExcept> must walk their children.
new mechanism in ap_check_cmd_context() for testing enclosure in a
Directory/Location/File: find_parent()
<IfModule> and <IfDefine> must pass cmd->context when walking the children
several places: we had a walk followed by ap_get_module_config(). that
assumed the walk would create a config that we could fetch, which is not
true -- it is possible that the children are all from other modules
(e.g. the <Files> section in httpd.conf-dist has no "core" directives).
using ap_set_config_vectors() ensures we get a structure, and it returns
it to us.
[ note: when we had </Directory> (and friends) in the tree, the config
would get created; removing the directive removed the config; this
was a bitch to track down :-) ]
Eliminate compile warning on Windows
[EBCDIC] Port Paul Gilmartin's CRLF patch from 1.3. This replaces most of the \015, \012, and \015\012 constants with macros. Submitted by: Greg Ames Reviewed by: Jeff Trawick
Provide prototypes for the provided strcasecmp & strncasecmp.
Change ap_context_t to ap_pool_t. This compiles, runs, and serves pages on Linux, but probably breaks somewhere.
And then there was 2.0a3-dev, and Ryan said "Doh!"
Update the version name in the tree for 2.0a2
Update to Apache Software License version 1.1
Backout layered I/O changes.
Enabled layered I/O. Docs are forthcoming.
Test for AP_USE_HSREGEX, not USE_HSREGEX, as that's what actually gets defined (in ap_config_auto.h) when using the bundled hsregex.
Eliminate implicit usage of access.conf and srm.conf.
Another one in the department of fairly useless patches which
are best described as feature creep. Allows ${ENV} constructs
in the config file. This avoids the need for mod_perl or
m4 cleverness whilst mainting some of the usefullness. It
does not do (of course) multiline things or anything that clever.
Feel free to flame me.
PR:
Obtained from:
Submitted by:
Reviewed by:
more missing from css
missing from css patch
Update the version string to reflect that we are currently working on Apache/2.0a2-dev.
Fix all the License issues. Including: s/Apache Group/Apache Software Foundation/ s/1999/2000/ s/Sascha's license/ASF license
Temporary hack to fix WIN32 compiles until the autoconf induced include file mess is fixed.
This patch is sure to break someone! We need to define MODULE_VAR_EXPORT, API_EXPORT, API_VAR_EXPORT, et. al. in an os specific way and the definitions need to be done as soon as possible in the include file chain. I choose to use os.h as the preferred mechanism for doing this (for now anyway) since this is they way it was done for Apache 1.3. win32/os.h and unix/os.h probably have some Apache private macro definitions that are being exposed publicly because of this patch. The solution to this problem is to remove the private definitions from os.h.
The 'canonical' name for this #define (as of Configure, ap_config_auto.h) is USE_HSREGEX
Back out most of the last commit. Keep APR macros seperate from Apache macros.
Convert HAVE_NETINET... to the APR mac
Manoj has been pushing for this for a while, but I've been too dense to understand that he was right. :-) Basically, this makes the modules use ap_config to test for header file inclusion. This method is not to be used for larger modules that run autoconf theirselves. Including ap_config is only valid for modules which rely on Apache to do their configuration. Currently, this is only the core modules.
Finish the commits for the change in the header files. Basically, this hides all of the Apache macros that modules don't need access to. This should have been committed with the modules, but I wasn't paying attention to the directory I was in when I ran the commit. Submitted by: Manoj Kasichainula and Ryan Bloom
time overhaul: - ap_time_t is a 64-bit scalar, microseconds since epoch - ap_exploded_time_t corresponds to struct tm with a few extras probably broken on anything except linux.
Separate the stat structure from the file structure and use ap_stat and ap_getfileinfo in apache.
Remove a bunch of functions that are being replaced by functions in APR. Also finished porting Apache to use APR in most cases.
First step in getting Apache to use APR's time libraries. This gets a good number of them, but I think there are more time values still in the Apache code. This works under Linux, but has not been tested anywhere else.
Fix even more "-i" -> " ap_context_t " changes.
Cleaned up the APRFile uses in Apache. Also removed the apr.h header file because it is no longer used. Finally, I updated the dependancies to compile cleanly.
De-errno ap_pcfg_openfile().
Add process_rec to the top of {server,connection,request}_rec
hierarchy of structs that abstract server activities. Store some
stuff in process_rec (finally a place to have nearly guiltless
globals) for example the global and configuration pools. Put some
operations on process_rec in http_main, in particular the
destroy_and_exit operation, and the use it to do all the exit calls.
Change ap_read_config to operation on this "object" rather than on the
configuration pool. Modify server_rec to point to the process, so you
can get at it most all the time which should finally allow most of the
server's malloc calls to be eliminated.
There are no locks in the process struct as yet, put them in as needed.
Some of the hooks should take this rather than conf. pool.
Remove obsolete ap_util_init function.
Move ap_pregcomp and ap_pregfree from APR to Apache proper, since these functions depend on Apache's regex libraries. This also should fix compilation on platforms not using hsregex.
Remove all of the calls to functions like "ap_popenf". These functions were moved down to APR, but they are being removed. They are not portable, and were only moved down for backwards compatability. With this change, they can be safely removed, which is the next commit on it's way. Submitted by: Ryan Bloom and Paul Reder
Changed pools to contexts. Tested with prefork and pthread mpm's. I'll check this out tomorrow and make sure everything was checked in correctly.
Now that this beast was officially declared as the Apache 2.0 stuff, let it also say this in his Server headers while testing. Those who dislike numbers: feel free to name it "foo" or whatever meaningless if it's important that we still do not use numbers. I just want that the version corresponds to the repository area, because I often get confused by running different Apache versions on my development box.
More MPM changes. Remove ap_can_exec and add a couple prototypes. Submitted by: Dean Gaudet
Replace all alarms and timeouts with a mutex on alloc. Replace file descriptors with APRFile. Add ap_is_aborted macro. Submitted by: Bill Stoddard, Dean Gaudet
Rearchitect the mess in http_main.c, http_core.c and buff.c. Basic restructuring to introduce the MPM concept; includes various changes to the module API... better described by docs/initial_blurb.txt. Created multiple process model (MPM) concept by ripping out the process guts from http_main.c and http_core.c and moving them to separate files under src/modules/mpm/ Moved socket creation stuff to listen.c. Moved connection open, maintenance and close to http_connection.c. I/O layering and BUFF revamp. Much of buff.c moved to ap_iol, iol_socket, and iol_file. See docs/buff.txt. Moved user and auth fields from connection_rec to request_rec. Removed RLIMIT stuff, supposedly to be implemented later in mod_cgi. Disabled suexec, supposedly to be reimplemented later. Submitted by: Dean Gaudet
Replace file descriptor with APRFile [Dean]
Apache 1.3.9 baseline for the Apache 2.0 repository. Obtained from: Apache 1.3.9 (minus unused files), tag APACHE_1_3_9 Submitted by: Apache Group
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.
| apache@apache.org | ViewVC Help |
| Powered by ViewVC 1.1.2 |