1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-06 09:01:14 +03:00
Commit Graph

2533 Commits

Author SHA1 Message Date
Jeff Trawick
1dc6636640 tidy up some charset recoding issues
the "need" for APACHE_XLATE went away some years ago when BUFF went
POOF and charset recoding (translation) of non-protocol data
could no longer be performed by the core...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101894 13f79535-47bb-0310-9956-ffa450edef68
2003-11-26 02:09:25 +00:00
André Malo
a7db87b9ad SECURITY [CAN-2003-0020]: escape arbitrary data before writing into the
errorlog.

Reviewed by: Mark J Cox


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101873 13f79535-47bb-0310-9956-ffa450edef68
2003-11-24 21:34:38 +00:00
Brian Pane
79a3c0c99b remove calls to the apr_proc_other_child_read function that no longer exists
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101858 13f79535-47bb-0310-9956-ffa450edef68
2003-11-24 01:34:04 +00:00
Jeff Trawick
0f5ba4e44d build with latest other-child API changes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101848 13f79535-47bb-0310-9956-ffa450edef68
2003-11-22 20:43:25 +00:00
Jeff Trawick
ffd07ca67c Account for some bytes handed to the network layer prior to
dropped connections.

Such bytes were counted on some paths but not on others.  If
these bytes are to be counted in some error paths, they should
be counted in the others.  We don't know if they were actually
presented to the client.

AFAIK, this only affects mod_logio.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101832 13f79535-47bb-0310-9956-ffa450edef68
2003-11-21 15:02:04 +00:00
Jeff Trawick
26c3384089 axe a comment... as with so many things, the true part isn't
interesting and the interesting part isn't true


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101829 13f79535-47bb-0310-9956-ffa450edef68
2003-11-21 03:29:11 +00:00
Jeff Trawick
6159e9455c simplify just a bit
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101828 13f79535-47bb-0310-9956-ffa450edef68
2003-11-21 03:26:14 +00:00
Brian Havard
eeb0224f02 Rework OS/2 MPM to use the pollset API.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101826 13f79535-47bb-0310-9956-ffa450edef68
2003-11-20 22:28:15 +00:00
Jeff Trawick
0beaea8979 spell check
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101822 13f79535-47bb-0310-9956-ffa450edef68
2003-11-20 21:31:59 +00:00
Bill Stoddard
c5b8379591 Win32: Make Win32 MPM transaction pools honor MaxMemFree
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101817 13f79535-47bb-0310-9956-ffa450edef68
2003-11-20 19:44:18 +00:00
Greg Stein
0ea3a6ccd9 Switch over to the new pollset API.
* server/mpm/worker/worker.c:
  (listener_thread): create and add sockets to the pollset using the new
    APIs. rearrange the round-robin a little bit to work with the new
    pollset return values.
    cleaning: get rid of an extraneous status variable. get rid of
      obsoleted round-robin code.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101801 13f79535-47bb-0310-9956-ffa450edef68
2003-11-16 23:47:07 +00:00
Greg Stein
6ff23b5f80 Switch the prefork MPM over to the new pollset interface.
* server/mpm/prefork/prefork.c:
  (listensocks[]): removed. not required.
  (child_main): stop using listensocks[] in favor of an apr_pollset_t. if
    there is just one listener, then always refer to that listener's
    listen_rec for further processing, otherwise poll and pick up the
    listen_rec pointer from the polling structure's client_data. tweaked
    the round-robin for the new pollset API (and documented).
    cleaning: removed 'offset' which is obviated by the use of a pointer
      to a listen_rec. tighten the block-scope of several variables.
      switch to use a 'status' variable name rather than three separately
      named variables. rename n->numdesc to be more obvious.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101799 13f79535-47bb-0310-9956-ffa450edef68
2003-11-16 23:03:18 +00:00
Justin Erenkrantz
c02dcf4c02 Sync with APR-util deprecated functions.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101789 13f79535-47bb-0310-9956-ffa450edef68
2003-11-16 02:22:25 +00:00
Cliff Woolley
aaf0424e2b get rid of _FOREACH
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101788 13f79535-47bb-0310-9956-ffa450edef68
2003-11-16 02:09:14 +00:00
Jeff Trawick
c9eb9be474 stop using deprecated apr_atomic functions
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101786 13f79535-47bb-0310-9956-ffa450edef68
2003-11-16 01:51:28 +00:00
Jim Jagielski
1ee9b271ec parsed_uri.port is only valid iff parsed_uri.port_str != NULL.
Old code simply checked if it was non-zero, not if it
was *valid*

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101774 13f79535-47bb-0310-9956-ffa450edef68
2003-11-13 15:18:35 +00:00
Jeff Trawick
de5a239b61 Fix uninitialized gprof directory name in prefork MPM.
PR:           24450
Submitted by: Chris Knight <Christopher.D.Knight@nasa.gov>
Reviewed by:  Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101714 13f79535-47bb-0310-9956-ffa450edef68
2003-11-07 13:40:04 +00:00
André Malo
1a7767b782 Let mod_autoindex show filenames containing special chars like %.
PR: 13598


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101659 13f79535-47bb-0310-9956-ffa450edef68
2003-11-01 22:29:42 +00:00
Bradley Nicholes
b9f260e722 When UseCanonicalName is set to OFF, allow ap_get_server_port to check
r->connection->local_addr->port before defaulting to server->port or
ap_default_port().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101519 13f79535-47bb-0310-9956-ffa450edef68
2003-10-22 17:07:26 +00:00
Jeff Trawick
0c3c5b7145 Set the scoreboard state to indicate logging prior to running
logging hooks so that server-status will show 'L' for hung loggers
instead of 'W'.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101517 13f79535-47bb-0310-9956-ffa450edef68
2003-10-22 16:45:53 +00:00
Joe Orton
bc2aea49ab Prevent slow graceful restarts on some platforms:
* prefork.c (ap_mpm_run): Only make as many dummy connections as slots
used, not as many as slots are available.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101513 13f79535-47bb-0310-9956-ffa450edef68
2003-10-22 11:38:46 +00:00
Jeff Trawick
45384da23b tag the pools created for requests and subrequests
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101441 13f79535-47bb-0310-9956-ffa450edef68
2003-10-13 23:43:00 +00:00
Stas Bekman
19eb03c5a6 fix the config parser to support <Foo>..</Foo> containers (no
arguments in the opening tag) supported by httpd 1.3. Without
this change mod_perl 2.0's <Perl> sections are broken.
PR:
Obtained from:
Submitted by:	"Philippe M. Chiasson" <gozer@cpan.org>
Reviewed by:	stas


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101415 13f79535-47bb-0310-9956-ffa450edef68
2003-10-11 06:37:45 +00:00
Martin Kraemer
fc166765da Cosmetics: remove redundancy
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101356 13f79535-47bb-0310-9956-ffa450edef68
2003-09-30 09:30:06 +00:00
Brian Pane
89bb4a8784 Switch to the new 32-bit APR atomic API for better portability
(the old code assumed that apr_atomic_t and apr_uint32_t were interchangeable).
Also, add more detailed comments on how one of the synchronization
functions works.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101340 13f79535-47bb-0310-9956-ffa450edef68
2003-09-29 03:58:41 +00:00
Cliff Woolley
990368f445 Setting lr = NULL on line 399 leads the the loop
closing early (see line 343) and the ap_listeners list being
nonsense.

End result is a segfault if something is already listening on ::
on our port when httpd is started.

Submitted by:	Colm MacCarthaigh <colm@stdlib.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101338 13f79535-47bb-0310-9956-ffa450edef68
2003-09-28 16:30:43 +00:00
Jeff Trawick
e470e0e792 change some error log messages to be more concise
Submitted by:	Bill Rowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101311 13f79535-47bb-0310-9956-ffa450edef68
2003-09-25 20:50:26 +00:00
Jeff Trawick
25103911fe Log an error when requests for URIs which fail to map to a valid
filesystem name are rejected with 403.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101310 13f79535-47bb-0310-9956-ffa450edef68
2003-09-25 16:00:56 +00:00
Brian Pane
2393e19673 Add casts to apr_atomic_casptr arguments to avoid compiler warnings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101236 13f79535-47bb-0310-9956-ffa450edef68
2003-09-13 03:45:50 +00:00
Jeff Trawick
468445ace2 zap an incorrect comment that remained from 1.3 days
Submitted by:	Aryeh Katz
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101211 13f79535-47bb-0310-9956-ffa450edef68
2003-09-10 12:12:18 +00:00
Brian Havard
4c43adfd90 OS/2: AP_MPM_WANT_SET_MAX_MEM_FREE needs to be defined for ap_max_mem_free to
be available which is required for the recent bucket_alloc changes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101200 13f79535-47bb-0310-9956-ffa450edef68
2003-09-08 22:32:36 +00:00
Martin Kraemer
1143775b66 Documentation says -DDUMP_VHOSTS is equivalent to setting -S
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101196 13f79535-47bb-0310-9956-ffa450edef68
2003-09-08 16:39:04 +00:00
Cliff Woolley
ad4ef6a24c revert my previous commit. when 2.0 and 2.1 were not in sync, i went with
what was in 2.0 because it was more recent, but it turns out that was
the wrong choice.  reverts to 2.0 to follow


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101173 13f79535-47bb-0310-9956-ffa450edef68
2003-09-05 22:46:17 +00:00
Jeff Trawick
0024a03faa Lower the severity of the "listener thread didn't exit" message
to debug, as it is of interest only to developers.

PR:                9011


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101165 13f79535-47bb-0310-9956-ffa450edef68
2003-09-05 19:36:26 +00:00
Cliff Woolley
9042470cbe forward-port Brad's commit to the 2.0 branch that gets rid of the
explicit bucket_alloc_destroy(), which is redundant


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101164 13f79535-47bb-0310-9956-ffa450edef68
2003-09-05 19:08:56 +00:00
Jeff Trawick
3090c1b2c5 Fix a misleading message from the some of the threaded MPMs when
MaxClients has to be lowered due to the setting of ServerLimit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101160 13f79535-47bb-0310-9956-ffa450edef68
2003-09-05 16:50:22 +00:00
Jeff Trawick
aa21671e13 switch to APR 1.0 API (which is still in flux)
because of the changes to the argument lists of apr_mmap_dup and apr_socket_create,
2.1-dev won't build with apr and apr-util's 0.9 branch anymore


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101154 13f79535-47bb-0310-9956-ffa450edef68
2003-09-03 19:27:12 +00:00
Cliff Woolley
a770ae9e77 Updated the various MPM's to use the new bucket_alloc_create_ex API
when necessary.  Which is to say that it's necessary in all cases except
for prefork, where the change to apr-util to have it use the allocator
from the pool passed in is already sufficient.

Reviewed by:	Jean-Jacques Clar, Sander Striker, Brad Nicholes


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101122 13f79535-47bb-0310-9956-ffa450edef68
2003-08-28 05:54:44 +00:00
Bradley Nicholes
dc4cfa1640 Make sure that the global ap_max_mem_free is initialized along with the
other MPM globals whenever HTTPD is started or restarted.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101117 13f79535-47bb-0310-9956-ffa450edef68
2003-08-27 22:33:12 +00:00
Joe Orton
ba375b841e * listen.c (ap_listen_open): Avoid casts when checking for :: and
0.0.0.0 to fix build on FreeBSD 4.2, and fix logic.

Reviewed by: Colm MacCarthaigh


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101096 13f79535-47bb-0310-9956-ffa450edef68
2003-08-25 16:00:49 +00:00
Justin Erenkrantz
1f638327b2 Fixup IPv6 Listen statements on Linux by attempting to bind in the order
that getaddrinfo() returned to us and skipping binding to IPv4 addresses
if the previous bind was to an IPv6 of the same address and port.

Justin made some style changes, added a (struct in6_addr*) to make it compile
on *BSD as well as an attempt to make the addition of the listener to the list
a little more efficient.

Submitted by:	Colm MacCarthaigh <colm@stdlib.net>
Reviewed by:	Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101083 13f79535-47bb-0310-9956-ffa450edef68
2003-08-24 22:43:36 +00:00
Stas Bekman
288d1a993d fix doc typo
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101061 13f79535-47bb-0310-9956-ffa450edef68
2003-08-22 20:57:32 +00:00
Justin Erenkrantz
c46cea0826 Change Listen directive to bind to all addresses returned by
apr_sockaddr_info_get when a hostname is not specified.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100999 13f79535-47bb-0310-9956-ffa450edef68
2003-08-15 02:25:41 +00:00
Justin Erenkrantz
8f96c3b14f More fun with IPv6 Listen statements.
- Remove the default_family declaration as it is no longer used.
- Fix segfault if checking NULL sa->hostname.
- Cycle through the bind_addr list if we get an error creating an IPv6 socket
  and we're IPv6 enabled and the binding address is NULL.  The odds are that
  we just can't support IPv6.  (The twist is that apr_sockaddr_info_get should
  return bind_addr's for IPv6 and IPv4.  This strikes me as slightly more
  elegant than the find_default_family hack.)

This should get us working on Linux and Netware again.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100994 13f79535-47bb-0310-9956-ffa450edef68
2003-08-14 00:05:26 +00:00
Justin Erenkrantz
7f56540ccf Correct failure with Listen directives on machines with IPv6 enabled by
removing find_default_family() and letting APR determine what should be done
without a hostname.

This patch requires the corollary APR patch to properly call getaddrinfo().

(Justin modified Colm's patch to always walk the old listeners even when
we have an address.  That part of the patch wasn't really relevant.)

Submitted by:	Colm MacC�rthaigh <colm@stdlib.net>
Reviewed by:	Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100978 13f79535-47bb-0310-9956-ffa450edef68
2003-08-13 19:17:45 +00:00
André Malo
7a51a3d41a split ap_process_resource_config into two functions (since we don't wanna
change the api). Only the first one (the ap_ entry point) now checks
for fnmatch and the second one will be called for every file/directory
included.
This, however, avoids infinite recursions, if a filename contains
wildcard characters.

PR: 22194


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100931 13f79535-47bb-0310-9956-ffa450edef68
2003-08-07 16:38:19 +00:00
Jeff Trawick
cdddc76c84 axe a special check for EOF+data from apr_file_gets()... apr_file_gets()
doesn't return that combination of conditions any more


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100826 13f79535-47bb-0310-9956-ffa450edef68
2003-07-28 20:10:42 +00:00
André Malo
a9ca268476 that loop was totally bogus.
r->content_type contains no more than one c-t
use ap_field_noparam to strip the decoration and
just a single condition to check the validity of r->content_type


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100763 13f79535-47bb-0310-9956-ffa450edef68
2003-07-24 15:26:56 +00:00
André Malo
cc0bce57b0 don't reverse the filter order in AddOutputFilterByType
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100760 13f79535-47bb-0310-9956-ffa450edef68
2003-07-24 14:36:54 +00:00
Joe Orton
6ba19e3b5b Speed up ap_md5digest() a little.
* util_md5.c (ap_md5digest): Use a larger buffer; ensure size is a
multiple of 64 to prevent buffering in MD5 code.  Remove redundant
'length' variable.  Reset read size in case of short reads.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100672 13f79535-47bb-0310-9956-ffa450edef68
2003-07-17 16:17:04 +00:00