1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-13 21:42:17 +03:00
Commit Graph

346 Commits

Author SHA1 Message Date
Eric Covener
fba67798ed PR56333: Add an API to resume a connection that a handler has previously suspended.
Submitted by: Artem <artemciy gmail.com>, Edward Lu <Chaosed0 gmail.com>
Committed by: covener


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1593860 13f79535-47bb-0310-9956-ffa450edef68
2014-05-11 20:52:32 +00:00
Christophe Jaillet
075cd89e14 Follow up to r1384924 .
Update comment and allocate one extra byte to be safe, even if not needed in the particular case described in r1384924.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1589599 13f79535-47bb-0310-9956-ffa450edef68
2014-04-24 06:29:28 +00:00
Jim Jagielski
b122567955 Add in the concept of "slave" connections...
Allows for several "connections" all resulting in
a single real connection that talks to the network.
Right now, nothing uses this though.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1565657 13f79535-47bb-0310-9956-ffa450edef68
2014-02-07 13:54:38 +00:00
Jeff Trawick
3508158873 doxygen improvements
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1560482 13f79535-47bb-0310-9956-ffa450edef68
2014-01-22 19:15:14 +00:00
Jan Kaluža
59bb55791e Add ap_errorlog_provider to make ErrorLog logging modular. Move
syslog support from core to new mod_syslog.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1525597 13f79535-47bb-0310-9956-ffa450edef68
2013-09-23 14:02:27 +00:00
Jeff Trawick
aa4d08ea75 fix Doxygen warnings/comments
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1513461 13f79535-47bb-0310-9956-ffa450edef68
2013-08-13 12:36:27 +00:00
Eric Covener
cd331723ca factor out DEFAULT_HANDLER_NAME
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1496709 13f79535-47bb-0310-9956-ffa450edef68
2013-06-26 02:29:43 +00:00
Jeff Trawick
cfb752e8e4 fix doc for ap_pregsub_ex() return code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1495501 13f79535-47bb-0310-9956-ffa450edef68
2013-06-21 16:45:51 +00:00
Stefan Fritsch
fe32420e2c Allow use of strtoul()
It conforms to C89 and we don't support older compilers than that.

PR: 55077


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1491155 13f79535-47bb-0310-9956-ffa450edef68
2013-06-09 08:19:29 +00:00
Graham Leggett
65e4ae72ee Note the given functions will be available in APR.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1490292 13f79535-47bb-0310-9956-ffa450edef68
2013-06-06 14:06:22 +00:00
Graham Leggett
997e0f6d33 core: Add the ability to do explicit matching on weak and strong ETags
as per RFC2616 Section 13.3.3.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1479528 13f79535-47bb-0310-9956-ffa450edef68
2013-05-06 11:41:10 +00:00
Graham Leggett
a47569f7c1 core, mod_ssl: Lift the restriction that prevents mod_ssl taking
full advantage of the event MPM. Enable the ability for a module
to reverse the sense of a poll event from a read to a write or vice
versa.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1470679 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 19:48:25 +00:00
Stefan Fritsch
76e9a1dcb5 disable pool alloc poisoning if APR_POOL_DEBUG is enabled because it uses
conflicting defines


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1459992 13f79535-47bb-0310-9956-ffa450edef68
2013-03-22 21:13:10 +00:00
Graham Leggett
894e7bdab2 Correct some spelling.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1448453 13f79535-47bb-0310-9956-ffa450edef68
2013-02-20 22:46:59 +00:00
Daniel Ruggeri
023e47cb2f Add helper function to execute command w args and get one line of output. Allow AuthLDAPBindPassword to have exec: argument like SSLPassPhraseDialog
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1433478 13f79535-47bb-0310-9956-ffa450edef68
2013-01-15 16:00:44 +00:00
Stefan Fritsch
40431c8d75 Add some caching for password hash validation.
Password hash functions must be expensive in order to be secure. But
if they have to be re-evaluated for every request, performance
suffers.

As a minimal remedy, cache the most recent result for every
connection. This gives a great performance boost if a web browser
does many requests on the same connection with the same
user+password.  In principle, this may keep the plain text password
around longer than before. But in practice, there won't be much
difference since user+password can already remain in some unused
data bucket for longer than the request duration.

A proper solution still needs to be found for connections from
proxies which may carry requests for many different users.

While it currently only requires the conn_rec, the new
ap_password_validate() function takes username and request_rec to
allow future extensions, like detection of brute-force attempts.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1427548 13f79535-47bb-0310-9956-ffa450edef68
2013-01-01 20:16:30 +00:00
Stefan Fritsch
f726113d33 Add an option to enforce stricter HTTP conformance
This is a first stab, the checks will likely have to be revised.
For now, we check

 * if the request line contains control characters
 * if the request uri has fragment or username/password
 * that the request method is standard or registered with RegisterHttpMethod
 * that the request protocol is of the form HTTP/[1-9]+.[0-9]+,
   or missing for 0.9
 * if there is garbage in the request line after the protocol
 * if any request header contains control characters
 * if any request header has an empty name
 * for the host name in the URL or Host header:
   - if an IPv4 dotted decimal address: Reject octal or hex values, require
     exactly four parts
   - if a DNS host name: Reject non-alphanumeric characters besides '.' and
     '-'. As a side effect, this rejects multiple Host headers.
 * if any response header contains control characters
 * if any response header has an empty name
 * that the Location response header (if present) has a valid scheme and is
   absolute

If we have a host name both from the URL and the Host header, we replace the
Host header with the value from the URL to enforce RFC conformance.

There is a log-only mode, but the loglevels of the logged messages need some
thought/work. Currently, the  checks for incoming data log for 'core' and the
checks for outgoing data log for 'http'. Maybe we need a way to configure the
loglevels separately from the core/http loglevels.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1426877 13f79535-47bb-0310-9956-ffa450edef68
2012-12-30 01:23:24 +00:00
Stefan Fritsch
5dd77695c6 extend description of r->hostname
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1426802 13f79535-47bb-0310-9956-ffa450edef68
2012-12-29 18:37:17 +00:00
Stefan Fritsch
25f0a51a21 add some nonnull fn attributes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1425444 13f79535-47bb-0310-9956-ffa450edef68
2012-12-23 08:55:45 +00:00
Stefan Fritsch
c39c61637e add new ap_bin2hex() utility function
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1422549 13f79535-47bb-0310-9956-ffa450edef68
2012-12-16 11:49:14 +00:00
Stefan Fritsch
68bf694f87 s/;;/;/
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1410971 13f79535-47bb-0310-9956-ffa450edef68
2012-11-18 19:57:08 +00:00
Stefan Fritsch
53c102c372 add attribute nonnull to a few functions
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1410963 13f79535-47bb-0310-9956-ffa450edef68
2012-11-18 19:31:39 +00:00
Joe Orton
44cb002091 Extract some more data through the server load API:
* include/httpd.h (struct ap_sload_t): Add bytes_served, access_count
  fields.

* server/util.c (ap_get_sload): Fill in those fields.

Submitted by: Jan Kaluza <jkaluza redhat.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1393338 13f79535-47bb-0310-9956-ffa450edef68
2012-10-03 08:20:50 +00:00
Jim Jagielski
1722688cb3 Break out loadavg from Apache load.... one is quick, the other
isn't so much, and so why load things up when wanting just
the server loadavg?

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1389564 13f79535-47bb-0310-9956-ffa450edef68
2012-09-24 20:50:58 +00:00
Jim Jagielski
1b69b60f1d minor name change, but I expect most will just want/need/use
the current load average, so simplify the name

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1389506 13f79535-47bb-0310-9956-ffa450edef68
2012-09-24 18:17:50 +00:00
Jim Jagielski
1134cfb81d Would be nice to have some sort of canonical definition
of server loading for Apache. So create a struct that
holds some useful data. The hope is that for those
platforms that lack getloadavg(), people will write
replacements.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1389481 13f79535-47bb-0310-9956-ffa450edef68
2012-09-24 16:56:58 +00:00
Stefan Fritsch
ec5abc7ad6 ap_sub_req_lookup_dirent() depends on the over-allocation done by
ap_make_full_path and ap_escape_uri, so let's document it so that it is not
accidentally removed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1384924 13f79535-47bb-0310-9956-ffa450edef68
2012-09-14 21:06:05 +00:00
Daniel Gruno
3b9804871f A dependant is depentent on a dependency (note the subtle difference in spelling)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1380525 13f79535-47bb-0310-9956-ffa450edef68
2012-09-04 10:29:47 +00:00
Jeff Trawick
5497cdd2b2 fix typo in comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1374856 13f79535-47bb-0310-9956-ffa450edef68
2012-08-19 21:41:50 +00:00
Daniel Gruno
8e0f68ea78 ap_str(case)cmp_match returns the opposite of what is advertized in the header.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1366319 13f79535-47bb-0310-9956-ffa450edef68
2012-07-27 09:57:09 +00:00
Jeff Trawick
fb2066579f modernize some commentary on APEXIT_foo values
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1363186 13f79535-47bb-0310-9956-ffa450edef68
2012-07-19 00:09:27 +00:00
Rainer Jung
b010e7ec9e Fix indentation.
No functional change.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1361791 13f79535-47bb-0310-9956-ffa450edef68
2012-07-15 20:29:56 +00:00
Rainer Jung
bfbbc819d5 Add missing HTTP status codes taken from
http://www.iana.org/assignments/http-status-codes/http-status-codes.xml 

The new codes are now known and some canned error
strings are provided. The web server does not yet actually
produce them in responses or reacts on getting them
from an origin server when acting as a proxy or gateway.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1361784 13f79535-47bb-0310-9956-ffa450edef68
2012-07-15 20:22:03 +00:00
Rich Bowen
7e7ed67d52 s/sinlge/single as per tid 53216. Via Christophe JAILLET
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1336891 13f79535-47bb-0310-9956-ffa450edef68
2012-05-10 21:13:53 +00:00
Stefan Fritsch
04906c79af Try to clarify what client_ip/client_addr means and point to useragent_ip
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1331115 13f79535-47bb-0310-9956-ffa450edef68
2012-04-26 21:51:09 +00:00
Stefan Fritsch
57a155737d fix some comments
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1328339 13f79535-47bb-0310-9956-ffa450edef68
2012-04-20 12:02:09 +00:00
Stefan Fritsch
7a8f5c88aa Take care not to call ap_start_lingering_close from the listener thread,
because it may block when flushing data to the client.

From the listener thread, do a lingering close without flushing. This is
OK because we only do this if there has been an error during write
completion or if our send buffers are empty because we are in keep-alive.

PR: 52229


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1294356 13f79535-47bb-0310-9956-ffa450edef68
2012-02-27 22:04:54 +00:00
Stefan Fritsch
401b5be562 In maintainer mode, replace apr_palloc with a version that
initializes the allocated memory with non-zero values, except if
AP_DEBUG_NO_ALLOC_POISON is defined.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1293408 13f79535-47bb-0310-9956-ffa450edef68
2012-02-24 20:47:01 +00:00
Stefan Fritsch
1bbff8f19b Replace ap_create_core_ctx()/ap_core_ctx_get_bb() with a hook
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1240470 13f79535-47bb-0310-9956-ffa450edef68
2012-02-04 09:44:19 +00:00
Stefan Fritsch
e499c6e683 Make the core input/output filter contexts private and provide accessor APIs
for mpm_winnt and mod_ftp.

This allows to add members to the context structs without breaking binary
compatibility.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1235019 13f79535-47bb-0310-9956-ffa450edef68
2012-01-23 21:58:42 +00:00
Stefan Fritsch
3b2b67b26f Fix cut'n'paster error
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1229136 13f79535-47bb-0310-9956-ffa450edef68
2012-01-09 13:08:11 +00:00
Stefan Fritsch
75dad9d44f Rename ap_func_attr_* macros to AP_FN_ATTR_*
Add macro for attribute alloc_size on newer gcc's


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1229134 13f79535-47bb-0310-9956-ffa450edef68
2012-01-09 13:06:18 +00:00
William A. Rowe Jr
2aa21a62b1 Clean up size_t abuse, part 2. ap_malloc/calloc/realloc are explicitly
excluded from this cleanup as they must be signature identical to the
clib functions, and although the definition of size_t has been flakey,
the definition of those functions appears to be generally clean since
ANSI C.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1228323 13f79535-47bb-0310-9956-ffa450edef68
2012-01-06 18:15:08 +00:00
Graham Leggett
cb21a0dbcc Further clarify the naming of the entity that directly connects to us by
calling that entity a client instead of a peer.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1214015 13f79535-47bb-0310-9956-ffa450edef68
2011-12-14 01:10:52 +00:00
Graham Leggett
2af2fa44ad Further clarify the naming of the entity that originates the request by
calling that entity a useragent instead of a client.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1214003 13f79535-47bb-0310-9956-ffa450edef68
2011-12-14 00:31:51 +00:00
Joe Orton
fd967eab44 * include/httpd.h, server/mpm/*/*.h: Tidy up doxygen tree view by moving
private interfaces into a separate group.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1211490 13f79535-47bb-0310-9956-ffa450edef68
2011-12-07 16:06:16 +00:00
Joe Orton
0071b626f2 * include/: Various doxy markup tweaks.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1211364 13f79535-47bb-0310-9956-ffa450edef68
2011-12-07 10:06:21 +00:00
Graham Leggett
394e5594d6 Introduce a per connection "peer_ip" and a per request "client_ip" to
distinguish between the raw IP address of the connection and the effective
IP address of the request.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1206291 13f79535-47bb-0310-9956-ffa450edef68
2011-11-25 19:42:04 +00:00
Graham Leggett
4ee7eea4cf Introduce a per request version of the remote IP address, which can be
optionally modified by a module when the effective IP of the client
is not the same as the real IP of the client (such as a load balancer).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204968 13f79535-47bb-0310-9956-ffa450edef68
2011-11-22 13:10:39 +00:00
Stefan Fritsch
ab7b448082 Fix segfault caused by r1204104 on non-async mpms.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204180 13f79535-47bb-0310-9956-ffa450edef68
2011-11-20 16:41:42 +00:00