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

8169 Commits

Author SHA1 Message Date
Stefan Fritsch
c6984dfd5e remove unneeded include statements
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1427546 13f79535-47bb-0310-9956-ffa450edef68
2013-01-01 19:50:56 +00:00
Stefan Fritsch
d47f71f7d9 Remove support for Request-Range header sent by Navigator 2-3 and
MSIE 3


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1427465 13f79535-47bb-0310-9956-ffa450edef68
2013-01-01 17:00:23 +00:00
Stefan Fritsch
8dcffbfbaa abort if BIO_new fails due to lack of memory
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1427456 13f79535-47bb-0310-9956-ffa450edef68
2013-01-01 16:23:28 +00:00
Stefan Fritsch
8283707a4f add log tags missing in r1426877
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1426879 13f79535-47bb-0310-9956-ffa450edef68
2012-12-30 01:28:17 +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
304f1d01bc Fix warning about discarding 'const' qualifier from pointer
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1426850 13f79535-47bb-0310-9956-ffa450edef68
2012-12-29 22:22:13 +00:00
Kaspar Brand
50eb694c34 mod_ssl: add support for subjectAltName-based host name checking in proxy mode
(PR 54030)

factor out code from ssl_engine_init.c:ssl_check_public_cert()
to ssl_util_ssl.c:SSL_X509_match_name()

introduce new SSLProxyCheckPeerName directive, which should eventually
obsolete SSLProxyCheckPeerCN

ssl_engine_io.c:ssl_io_filter_handshake(): avoid code duplication
when aborting with HTTP_BAD_GATEWAY


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1425874 13f79535-47bb-0310-9956-ffa450edef68
2012-12-26 10:54:54 +00:00
Daniel Gruno
3d8bdb7d7c Style tweaks, remove add_version_component and fix up some sloppy code. Many thanks to sfritsch for the pointers!
And a merry christmas everyone :)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1425450 13f79535-47bb-0310-9956-ffa450edef68
2012-12-23 10:28:16 +00:00
Stefan Fritsch
8a94c4aa9b style fixes, add comment
no code change


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1425360 13f79535-47bb-0310-9956-ffa450edef68
2012-12-22 22:29:06 +00:00
Daniel Gruno
1050577245 Style tweaks, no functional change.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1425243 13f79535-47bb-0310-9956-ffa450edef68
2012-12-22 05:25:50 +00:00
Daniel Gruno
c1f9c7546f - return NULL if apr_reslist_acquire fails, so we don't end up possibly referencing a null-object
- initialize cache_info as NULL

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1424939 13f79535-47bb-0310-9956-ffa450edef68
2012-12-21 14:53:55 +00:00
Daniel Gruno
d9e3aa7316 Remove reference to top secret project! You did not see this commit message ;)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1424938 13f79535-47bb-0310-9956-ffa450edef68
2012-12-21 14:49:06 +00:00
Daniel Gruno
8767ad9988 mod_lua: Fix multipart post parsing, so it doesn't include random bytes at the end.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1424723 13f79535-47bb-0310-9956-ffa450edef68
2012-12-20 21:52:03 +00:00
Joe Orton
a685d6ae6b * modules/proxy/mod_proxy_ftp.c: Fill in APLOGNO.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1423353 13f79535-47bb-0310-9956-ffa450edef68
2012-12-18 09:01:02 +00:00
Jim Jagielski
26ecd7b2fe Redfine - we are just worried about balancers and workers, so have the directive clear about that.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1422980 13f79535-47bb-0310-9956-ffa450edef68
2012-12-17 15:24:40 +00:00
Jim Jagielski
26036be3a5 restrict inherit control to those fields that "require" it...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1422943 13f79535-47bb-0310-9956-ffa450edef68
2012-12-17 14:25:46 +00:00
Guenter Knauf
6005430c9a Added missing exports for NetWare.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1422874 13f79535-47bb-0310-9956-ffa450edef68
2012-12-17 11:48:28 +00:00
Stefan Fritsch
a70974b4d9 use ap_bin2hex() to simplify md5/sha1 code
also fixes some 'array subscript is above array bounds' warnings


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1422552 13f79535-47bb-0310-9956-ffa450edef68
2012-12-16 11:51:56 +00:00
Stefan Fritsch
4cd818b34b remove unused variable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1422548 13f79535-47bb-0310-9956-ffa450edef68
2012-12-16 11:48:19 +00:00
Daniel Gruno
999476f7f7 mod_lua: Fix unitialized variable in lua_ap_send_interim_response.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1422531 13f79535-47bb-0310-9956-ffa450edef68
2012-12-16 11:30:54 +00:00
Daniel Gruno
5a3e2e44dc mod_lua: If a regex fails, return false plus an error message as second return value. Also fix some functions who weren't always returning a value.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1422373 13f79535-47bb-0310-9956-ffa450edef68
2012-12-15 22:03:47 +00:00
Eric Covener
f19f43afc9 fix r1416889 a different way -- the referer should be const too.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1422253 13f79535-47bb-0310-9956-ffa450edef68
2012-12-15 14:27:52 +00:00
Eric Covener
f6949ccc77 const fixes for mod_imagemap, fatal on old xlc due to returning apr_table_get result
from non const function.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1422234 13f79535-47bb-0310-9956-ffa450edef68
2012-12-15 12:34:56 +00:00
Daniel Gruno
ff81e58f05 mod_lua: Fix Windows compatibility issues and remove an unused variable. Thanks, Gregg!
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1422072 13f79535-47bb-0310-9956-ffa450edef68
2012-12-14 20:44:41 +00:00
Jim Jagielski
74708ea8f3 Allow for searching w/i shm slots for a specific worker and balancer
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1421953 13f79535-47bb-0310-9956-ffa450edef68
2012-12-14 16:14:06 +00:00
Rainer Jung
b63656829c Use inherit_set to let the global server set
the default for all vhosts.

Otherwise inherit would need to be disabled
redundantly in each vhost.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1421912 13f79535-47bb-0310-9956-ffa450edef68
2012-12-14 15:02:30 +00:00
Jim Jagielski
755fc20b6e be consistent
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1421882 13f79535-47bb-0310-9956-ffa450edef68
2012-12-14 14:20:26 +00:00
Jim Jagielski
bdafd4e926 Anticipate ordering for 2.4 backport
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1421852 13f79535-47bb-0310-9956-ffa450edef68
2012-12-14 13:30:45 +00:00
Daniel Gruno
b849415518 mod_lua: Oops, there was a stray 'int i' in the middle of lua_ap_regex.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1421784 13f79535-47bb-0310-9956-ffa450edef68
2012-12-14 10:25:31 +00:00
Daniel Gruno
df178d1e41 mod_lua: Fix signedness/other small bugs as per cjaillet/fuankg's emails - thanks guys :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1421780 13f79535-47bb-0310-9956-ffa450edef68
2012-12-14 10:15:37 +00:00
Stephen Henson
2f58146bae Add support for OpenSSL configuration commands.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1421323 13f79535-47bb-0310-9956-ffa450edef68
2012-12-13 14:52:47 +00:00
Stephen Henson
2fb0965919 Avoid use of deprecated functions for OpenSSL version >= 1.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1421305 13f79535-47bb-0310-9956-ffa450edef68
2012-12-13 14:12:45 +00:00
Jim Jagielski
e196d0d0db inherit inherit
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1421288 13f79535-47bb-0310-9956-ffa450edef68
2012-12-13 13:36:08 +00:00
Gregg Lewis Smith
d559055384 Fix various clone/edit and search/replace errors
in MSVC project files



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1420975 13f79535-47bb-0310-9956-ffa450edef68
2012-12-12 21:14:57 +00:00
Daniel Gruno
3b6cdb0f92 mod_lua: Add a lot of core httpd/apr functionality to mod_lua
(such as regex matching, expr evaluation, changing/fetching server configuration/info - see docs for a complete list).
This also includes a bunch of automatically scraped functions, which may or may not be super useful.
Comments appreciated as always, especially on the more hacky bits.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1420377 13f79535-47bb-0310-9956-ffa450edef68
2012-12-11 20:08:24 +00:00
Daniel Gruno
1a50285096 lua_request.c: Add support for parsing multipart form data via r:parsebody. This is a bit RFC-centric, suggestions are most welcome.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1420286 13f79535-47bb-0310-9956-ffa450edef68
2012-12-11 17:09:40 +00:00
Joe Orton
c945772cba * modules/proxy/mod_proxy_ftp.c (proxy_ftp_handler): Simplify EPSV
address handling to avoid overhead of unnecessary
  binary->text->binary conversion, and ensuring the socket family
  really matches the address used.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1420223 13f79535-47bb-0310-9956-ffa450edef68
2012-12-11 15:28:05 +00:00
Joe Orton
ca24cf975a * modules/aaa/mod_authz_owner.h: Add header file with optional hook
declaration for "authz_owner_get_file_group".

* modules/aaa/mod_authz_dbm.c, modules/aaa/mod_authz_groupfile.c: Use
  the header to pick up the above declaration; retrieve the optional
  function in a hook; use a static variable to store the function
  pointer.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1420184 13f79535-47bb-0310-9956-ffa450edef68
2012-12-11 14:13:44 +00:00
Daniel Gruno
ef9056a534 lua_vmprep.c: Additional check to see if the resource list was successfully created, so we don't end up trying to fetch a non-existent resource list when we use the 'server' option for the LuaScope directive.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1420181 13f79535-47bb-0310-9956-ffa450edef68
2012-12-11 14:11:41 +00:00
Daniel Gruno
c36aeb051d mod_lua/lua_request.c: Make r:write return the return value of ap_rwrite, so mod_lua can check for success/failure in writing.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1420176 13f79535-47bb-0310-9956-ffa450edef68
2012-12-11 14:06:41 +00:00
Jim Jagielski
ce9b646c73 rjung's suggestions...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1420124 13f79535-47bb-0310-9956-ffa450edef68
2012-12-11 12:35:50 +00:00
Christophe Jaillet
1fc22893b4 mod_proxy_balancer: It's totally unclear what Drn, Dis, Ign, Stby means.
PR 52478

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1419796 13f79535-47bb-0310-9956-ffa450edef68
2012-12-10 21:35:16 +00:00
Christophe Jaillet
a0cc7380c3 Use 'apr_is_empty_table()' instead of testing against 'apr_table_elts(...)->nelts'
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1419781 13f79535-47bb-0310-9956-ffa450edef68
2012-12-10 21:24:59 +00:00
Christophe Jaillet
af32fbebef Avoid unnecessary %s substitution
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1419755 13f79535-47bb-0310-9956-ffa450edef68
2012-12-10 20:53:24 +00:00
Christophe Jaillet
b22505292e No need to clear memory that is fully initialized just the line after.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1419719 13f79535-47bb-0310-9956-ffa450edef68
2012-12-10 20:19:20 +00:00
Gregg Lewis Smith
3e8254fb4c Add mod_allowhandlers to Windows build
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1418867 13f79535-47bb-0310-9956-ffa450edef68
2012-12-09 09:46:47 +00:00
Stefan Fritsch
2369b0ecd5 Fix a few 'too many arguments for format' warnings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1418769 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 22:26:12 +00:00
Stefan Fritsch
8b22033a29 make ssl_io_data_dump respect per-conn loglevel
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1418765 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 22:06:49 +00:00
Stefan Fritsch
14f1654b1f rename variables: s should be the server_rec
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1418763 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 22:06:09 +00:00
Stefan Fritsch
7b8a5d3d58 Don't claim "BIO dump follows" if it is not logged due to log level config.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1418761 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 21:47:27 +00:00