1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00

685 Commits

Author SHA1 Message Date
Paul Querna
cf10bfaefa mod_proxy_ftp: Fix comparison of char* to '\0'
PR: 34512


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@179704 13f79535-47bb-0310-9956-ffa450edef68
2005-06-03 02:44:39 +00:00
Paul Querna
693107a967 - Use apr_uri_t to parse the proxy URL, instead of munging it by hand. Original code did not handle IPv6 Addresses correctly.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@178391 13f79535-47bb-0310-9956-ffa450edef68
2005-05-25 06:42:33 +00:00
William A. Rowe Jr
20d06d7a06 Reintroduce stack frame construction with /Oy- (removal was implied by /O2).
This makes binaries far easier to debug, during operation and for post-crash
  .dmp analysis.  Do not alter /Gs optimizations per brane.

Reviewed by: stoddard, brane

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@170253 13f79535-47bb-0310-9956-ffa450edef68
2005-05-15 19:11:57 +00:00
Paul Querna
c84966321a Make sure mod_rewrite always runs before mod_proxy in the translate_name hook. This makes doing RewriteRules on a Reverse Proxy.. Slightly more predictable than the order of LoadModules.
Reported By: David D. Miller <justdave bugzilla.org>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@169692 13f79535-47bb-0310-9956-ffa450edef68
2005-05-11 20:11:44 +00:00
Bradley Nicholes
93e638300b Link to the correct socket library depending on which one is selected
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@161791 13f79535-47bb-0310-9956-ffa450edef68
2005-04-18 19:54:33 +00:00
Mladen Turk
9fac5c4376 Add failover to mod proxy. If the service is unavailable,
check another worker in case this is balancer request.
In case the error in unrecoverable, fail with returned
status code.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160848 13f79535-47bb-0310-9956-ffa450edef68
2005-04-11 08:45:15 +00:00
Mladen Turk
e32503984e Set default number of maxattempts to the number of
balancer members.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160847 13f79535-47bb-0310-9956-ffa450edef68
2005-04-11 08:42:33 +00:00
Bradley Nicholes
bdd9c004ff Add two more APIs to the export and import lists for NetWare
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160725 13f79535-47bb-0310-9956-ffa450edef68
2005-04-10 00:17:44 +00:00
Mladen Turk
363117e7a1 Move direct_connect out of attempt loop. No need to
calculate that value on each attempt, because it's always
the same.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160705 13f79535-47bb-0310-9956-ffa450edef68
2005-04-09 18:33:00 +00:00
Mladen Turk
d13b2de6e2 Simplify canon_handler. There is no thing like ajps:
protocol.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160693 13f79535-47bb-0310-9956-ffa450edef68
2005-04-09 16:34:33 +00:00
Mladen Turk
c4323f9615 Simplify canon_handler. Blancer can have only a single
scheme.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160692 13f79535-47bb-0310-9956-ffa450edef68
2005-04-09 16:32:32 +00:00
Mladen Turk
0eab042f6a Use two optional functions from mod_ssl so that we
can receive both is_ssl and ssl_var for ajp protocol.
This is combined work based on patch from Brad Boyer and
Joe Orton's suggestion to use ssl_var_lookup.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160690 13f79535-47bb-0310-9956-ffa450edef68
2005-04-09 16:16:54 +00:00
Mladen Turk
000d9acf74 Return correct status codes in case of bad request, that
is probably too large for AJP protocol.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160677 13f79535-47bb-0310-9956-ffa450edef68
2005-04-09 10:39:50 +00:00
Mladen Turk
76efadaa27 Add canon_handler for load balancer so that we have
query string passed to remote.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160675 13f79535-47bb-0310-9956-ffa450edef68
2005-04-09 10:12:01 +00:00
Mladen Turk
86efa87d70 Revert the latest hack for setting query string.
The balancer needs canon_handler.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160674 13f79535-47bb-0310-9956-ffa450edef68
2005-04-09 10:08:56 +00:00
Mladen Turk
f29c4bc75a Return 'real' error status codes instead APR_EGENERAL.
The return status code will be used to determine wether
the message is invalid or the remote host failed processing
the request. This is needed to mark the worker as in
error state in case it is member of load balancer.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160668 13f79535-47bb-0310-9956-ffa450edef68
2005-04-09 08:37:06 +00:00
Mladen Turk
94f13c9748 Add r->args to uri->query if the original r->uri
did not contain query string. This fixes #34266.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160663 13f79535-47bb-0310-9956-ffa450edef68
2005-04-09 07:32:42 +00:00
Mladen Turk
7e5069e82e Remove useless loging of something that is not an error.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160661 13f79535-47bb-0310-9956-ffa450edef68
2005-04-09 06:55:13 +00:00
Joe Orton
2ce86aa6ee * modules/proxy/mod_proxy_http.c (ap_proxy_http_process_response):
Don't send an EOS after an interim response.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@159671 13f79535-47bb-0310-9956-ffa450edef68
2005-04-01 09:30:01 +00:00
Sander Striker
f3886551fa * modules/proxy/mod_proxy_http.c
(ap_proxy_http_process_response): Fix a comment.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@159534 13f79535-47bb-0310-9956-ffa450edef68
2005-03-30 23:09:32 +00:00
Sander Striker
1073345b0f * modules/proxy/mod_proxy_http.c
(ap_proxy_http_process_response): When there are only headers and no body,
   give the remainder of the output filters a chance by pushing an EOS bucket
   through the filter stack.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@159533 13f79535-47bb-0310-9956-ffa450edef68
2005-03-30 22:58:08 +00:00
Justin Erenkrantz
8bc56b5d29 mod_proxy: Add proxy-sendextracrlf option to send an extra CRLF at the
end of the request body to work with really old HTTP servers.

* modules/proxy/mod_proxy_http.c
  (stream_reqbody_cl, spool_reqbody_cl): If proxy-sendextracrlf option is
  present, append a CRLF to the body stream that isn't counted against CL.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@157478 13f79535-47bb-0310-9956-ffa450edef68
2005-03-14 22:22:58 +00:00
Joe Orton
119d90c9bc * modules/proxy/mod_proxy_http.c (ap_proxy_http_process_response): Fix
spurious error at EOF.

PR: 33615


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@155209 13f79535-47bb-0310-9956-ffa450edef68
2005-02-24 16:52:34 +00:00
Paul Querna
09f8a5c2f8 Fix a syntax error when DEBUGGING is defined.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@154199 13f79535-47bb-0310-9956-ffa450edef68
2005-02-17 22:02:16 +00:00
Joe Orton
a0570c8746 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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@153384 13f79535-47bb-0310-9956-ffa450edef68
2005-02-11 12:00:41 +00:00
Jeff Trawick
9ff46dd755 Remove formatting characters from ap_log_error() calls. These
were escaped as fallout from CAN-2003-0020.

Submitted by: Eric Covener <ecovener gmail.com>
Reviewed by: Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@153105 13f79535-47bb-0310-9956-ffa450edef68
2005-02-09 19:01:43 +00:00
Sander Striker
d55cef82b3 * modules/proxy/mod_proxy_ajp.c
(proxy_ajp_handler): Log error when a backend connection could not
    be made.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@152966 13f79535-47bb-0310-9956-ffa450edef68
2005-02-09 00:21:49 +00:00
Sander Striker
7b9a0e8388 * modules/proxy/proxy_util.c
(ap_proxy_pre_request): Log an error when all workers are busy.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@152964 13f79535-47bb-0310-9956-ffa450edef68
2005-02-08 23:57:50 +00:00
Jim Jagielski
5875d5f9cf If we rec' a bad response header line, ignore what we've
rec'd so far and force BAD_GATEWAY.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@152676 13f79535-47bb-0310-9956-ffa450edef68
2005-02-08 16:08:53 +00:00
Jim Jagielski
d1db88d8ad Better handle the case where ProxyBadHeader StartBody is
in effect and we think we've started reading in the
response body. Take advantage of the fact that the
line read is still in buffer (and document that)
to allow us to add to the bb.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151722 13f79535-47bb-0310-9956-ffa450edef68
2005-02-07 15:41:28 +00:00
Justin Erenkrantz
905cdf9f0b Update copyright year to 2005 and standardize on current copyright owner line.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
2005-02-04 20:28:49 +00:00
Joe Orton
7e76c37963 * modules/proxy/config.m4: Fix mod_proxy build after filename changes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151329 13f79535-47bb-0310-9956-ffa450edef68
2005-02-04 07:57:10 +00:00
Justin Erenkrantz
632ec345e9 mod_proxy: Fix ProxyRemoteMatch directive.
PR: 33170
Submitted by: Rici Lake <rici ricilake.net>
Reviewed by:  Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151248 13f79535-47bb-0310-9956-ffa450edef68
2005-02-03 23:18:48 +00:00
Sander Striker
15ec543f2b Also translate Destination headers when ProxyPassReverse'd
* modules\proxy\mod_proxy_http.c

  (process_proxy_header): reverse map Destination header.

  NOTE: This is some darn nasty looking code...


* modules\proxy\ajp_header.c

  (ajp_unmarshal_response): reverse map Destination header.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151246 13f79535-47bb-0310-9956-ffa450edef68
2005-02-03 23:04:04 +00:00
Sander Striker
4162b98a0f Clean up some crumbs... The sandwich is next.
* modules\proxy\mod_proxy.c

  (alias_match): Removed unused variables.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151241 13f79535-47bb-0310-9956-ffa450edef68
2005-02-03 22:05:06 +00:00
Sander Striker
0f59873110 Rename proxy modules.
* modules\proxy\mod_proxy_ajp.c
* modules\proxy\mod_proxy_balancer.c
* modules\proxy\mod_proxy_connect.c
* modules\proxy\mod_proxy_ftp.c
* modules\proxy\mod_proxy_http.c

  Renamed from proxy_{ajp,balancer,connect,ftp,http}.c


* modules\proxy\mod_proxy_ajp.dsp
* modules\proxy\mod_proxy_balancer.dsp
* modules\proxy\mod_proxy_connect.dsp
* modules\proxy\mod_proxy_ftp.dsp
* modules\proxy\mod_proxy_http.dsp

  Update references to renamed files.


* modules\proxy\NWGNUproxyajp
* modules\proxy\NWGNUproxybalancer
* modules\proxy\NWGNUproxycon
* modules\proxy\NWGNUproxyftp
* modules\proxy\NWGNUproxyhtp

  Update references to renamed files.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151238 13f79535-47bb-0310-9956-ffa450edef68
2005-02-03 21:56:30 +00:00
Jim Jagielski
745572221a Remove old FIX_15207 snippets
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151212 13f79535-47bb-0310-9956-ffa450edef68
2005-02-03 19:25:38 +00:00
Jeff Trawick
749c63b3de proxy HTTP: Rework the handling of request bodies to handle
chunked input and input filters which modify content length, and
avoid spooling arbitrary-sized request bodies in memory.

This is a merge of the proxy-reqbody branch into the trunk.

Justin had the protocol issues resolved in 2.1-dev, but not the 
memory issue.  The new implementation makes an effort to
stream the request body whenever possible.

Thanks to Allan Edwards for a critical bug fix, Greg Ames
for some style corrections, Justin for a needed commentary
addition, Jan Kratochvil for testing the analogous 2.0.x patch 
with the SonyEricsson P900 phone, and reviews by all these 
folks + JimJag.

PR: 15859


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151168 13f79535-47bb-0310-9956-ffa450edef68
2005-02-03 16:03:42 +00:00
Jim Jagielski
9935c31bdd Close PR 32459, 15207. API change for PROXY_DECLARE ap_proxy_canonenc()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151153 13f79535-47bb-0310-9956-ffa450edef68
2005-02-03 13:38:24 +00:00
Mladen Turk
e6664a0bb2 Fix #32367 support for ProxyPass /foo !
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@149420 13f79535-47bb-0310-9956-ffa450edef68
2005-02-01 17:17:40 +00:00
Jim Jagielski
fe2650384d Add in a weighted byte count of all traffic (in and out) as
an alternative balancing method. We do not "adjust" the
byte count wrt scheme or method, simply by factoring
in the lbfactor value.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@126304 13f79535-47bb-0310-9956-ffa450edef68
2005-01-24 18:28:16 +00:00
Joe Orton
208eb7ae61 * modules/proxy/proxy_http.c (ap_proxy_http_process_response): Handle
aborted connections correctly: abort if c->aborted is set.

* modules/proxy/proxy_ftp.c (proxy_ftp_handler): Likewise.

PR: 32443
Submitted by: Janne Hietamäki, Joe Orton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@125612 13f79535-47bb-0310-9956-ffa450edef68
2005-01-19 11:05:57 +00:00
Jim Jagielski
bd10bb4108 Match parameter types
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@124912 13f79535-47bb-0310-9956-ffa450edef68
2005-01-11 17:15:02 +00:00
Sander Striker
46ba14216d Rewrite Cookies and other headers in mod_proxy_ajp as configured with
ProxyPassReverse and ProxyPassReverseCookiePath.

* modules/proxy/proxy_ajp.c

  (ap_proxy_ajp_request): Update call to ajp_parse_header().


* modules/proxy/ajp.h

  (ajp_msg_get_string): constify argument.

  (ajp_parse_header): Add conf argument.


* modules/proxy/proxy_util.c

  (ap_proxy_location_reverse_map): Promoted from mod_proxy_http.

  (ap_proxy_cookie_reverse_map): Promoted from mod_proxy_http;
    renamed from proxy_cookie_reverse_map.


* modules/proxy/ajp_msg.c

  (ajp_msg_get_string): constify argument.


* modules/proxy/proxy_http.c

  (ap_proxy_location_reverse_map, proxy_cookie_reverse_map: Removed.

  (process_proxy_header): Update header mapping table to reference the now
    public functions.


* modules/proxy/ajp_header.c

  (ajp_unmarshal_response): And conf argument.  Reverse map cookies and
    other headers.

  (ajp_parse_header): Update call to ajp_unmarshal_response().


* modules/proxy/mod_proxy.h

  (ap_proxy_location_reverse_map, ap_proxy_cookie_reverse_map): Declare
    functions that have been promoted to be public.

  (ap_proxy_header_reverse_map_fn): Typedef for the signature of the above
    two functions (currently used in mod_proxy_http).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@124901 13f79535-47bb-0310-9956-ffa450edef68
2005-01-11 08:35:46 +00:00
Sander Striker
47c6e884b2 Make the combination of mod_proxy_ajp and mod_rewrite work correctly.
* modules/proxy/proxy_ajp.c

  (ap_proxy_ajp_request): Update call to ajp_send_header().


* modules/proxy/ajp.h

  (ajp_send_header): Add a uri parameter.


* modules/proxy/ajp_header.c

  (ajp_marshal_into_msgb): Add a uri parameter and use the
   passed in uri instead of r->uri.

  (ajp_send_header): Add a uri parameter.  Update call to
   ajp_marshal_into_msgb().


* modules/mappers/mod_rewrite.c

  (is_absolute_uri): Add handling of 'ajp' and 'balancer' schemes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@124584 13f79535-47bb-0310-9956-ffa450edef68
2005-01-07 22:17:48 +00:00
William A. Rowe Jr
a7b143ff4d Fix a signedness issue that revealed a serious bug, the 'i' was
reused for character indexing within this loop.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@124277 13f79535-47bb-0310-9956-ffa450edef68
2005-01-05 21:23:03 +00:00
Mladen Turk
6ef95d4e37 Kill the pool cleanup when closing non cachable connection.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123884 13f79535-47bb-0310-9956-ffa450edef68
2005-01-02 08:00:26 +00:00
William A. Rowe Jr
d962fcfc8b 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123882 13f79535-47bb-0310-9956-ffa450edef68
2005-01-02 05:33:44 +00:00
Mladen Turk
55230b229b Fix closing connection for non-cachable proxies.
Do not close the entire connection, just socket if
opened.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123842 13f79535-47bb-0310-9956-ffa450edef68
2005-01-01 16:04:25 +00:00
Mladen Turk
def2248738 Close the connection for generic forward and
reverse proxy workers.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123840 13f79535-47bb-0310-9956-ffa450edef68
2005-01-01 15:23:51 +00:00