1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-14 01:22:37 +03:00
Commit Graph

187 Commits

Author SHA1 Message Date
Graham Leggett
1d1c483317 core, mod_proxy: If a kept_body is present, it becomes safe for
subrequests to support message bodies. Make sure that safety
checks within the core and within the proxy are not triggered
when kept_body is present. This makes it possible to embed
proxied POST requests within mod_include.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@654968 13f79535-47bb-0310-9956-ffa450edef68
2008-05-09 22:40:01 +00:00
Jean-Frederic Clere
334a396c0e Typo.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@650026 13f79535-47bb-0310-9956-ffa450edef68
2008-04-21 06:50:36 +00:00
Jim Jagielski
b86ddabbef Set at init time, and combine comments
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@649922 13f79535-47bb-0310-9956-ffa450edef68
2008-04-20 14:23:25 +00:00
Ruediger Pluem
990f2aafc4 * Do not add the query string again in the case that we are using the
unparsed uri.

PR: 44803


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@649840 13f79535-47bb-0310-9956-ffa450edef68
2008-04-19 18:48:05 +00:00
Jim Jagielski
aa2cf4597d handle ? in cases where nocanon is in effect
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@649239 13f79535-47bb-0310-9956-ffa450edef68
2008-04-17 19:20:16 +00:00
Ruediger Pluem
389a94500d * In the case that we fail to read the response line from the backend and if
we are a reverse proxy request shutdown the connection WITHOUT ANY response
  to trigger a retry by the client if allowed (as for idempotent requests).
  BUT currently we should not do this if the request is the first request on
  a keepalive connection as browsers like seamonkey only display an empty page
  in this case and do not do a retry.

Related to PR 37770



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645813 13f79535-47bb-0310-9956-ffa450edef68
2008-04-08 09:49:13 +00:00
Ruediger Pluem
0eed857a74 * Fix comment. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@617653 13f79535-47bb-0310-9956-ffa450edef68
2008-02-01 21:21:01 +00:00
Ruediger Pluem
cbb2178f26 * Fix processing of chunked responses if Connection: Transfer-Encoding is
set in the response of the proxied system.

PR: 44311


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@616517 13f79535-47bb-0310-9956-ffa450edef68
2008-01-29 20:55:38 +00:00
Eric Covener
8ea9fdcbc0 *) mod_proxy_http: Return HTTP status codes instead of apr_status_t
values for errors encountered while forwarding the request body
     PR 44165 [Eric Covener]

See also PR 31759 / r448711



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@611292 13f79535-47bb-0310-9956-ffa450edef68
2008-01-11 20:30:23 +00:00
Ruediger Pluem
bd49c01685 * Enable the proxy to keep connections persistent in the HTTPS case.
Basicly the persistence is created by keeping the conn_rec structure
  created for our backend connection (whether http or https) in the connection
  pool. This required to adjust scoreboard.c in a way that its functions can
  properly deal with a NULL scoreboard handle by ignoring the call or returning
  an error code.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@602542 13f79535-47bb-0310-9956-ffa450edef68
2007-12-08 20:10:29 +00:00
Nick Kew
c94140fb01 Add option not to send&clear response headers in ap_send_interim_response.
We'll need this option to fix PR#43711, and ap_send_interim_response
is fortunately too new an API to have made it into anything stable.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@588806 13f79535-47bb-0310-9956-ffa450edef68
2007-10-26 23:56:06 +00:00
Nick Kew
785b0379d6 mod_proxy: add "nocanon" keyword to ProxyPass, to suppress
URI-canonicalisation in a reverse proxy.
PR 41798


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@588791 13f79535-47bb-0310-9956-ffa450edef68
2007-10-26 23:07:22 +00:00
Joe Orton
8ecbe56eef * modules/proxy/mod_proxy_http.c (ap_proxy_http_register_hook): Fix
apr_pool_cleanup_register() invocation added in r583202, which was
  causing every apr_proc_create() call to segfault.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@583813 13f79535-47bb-0310-9956-ffa450edef68
2007-10-11 13:02:35 +00:00
Jim Jagielski
854e85d642 (forward) proxy should not be verifying/checking for
valid chars in a URI... pass through.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@583803 13f79535-47bb-0310-9956-ffa450edef68
2007-10-11 12:38:14 +00:00
Jim Jagielski
2349488a44 Abstract out "verification of valid encoding" via
ap_proxy_isvalidenc(). Now we can use it in other
proxy protocols.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@583466 13f79535-47bb-0310-9956-ffa450edef68
2007-10-10 13:16:56 +00:00
Nick Kew
781cb3ce13 missing include!
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@583205 13f79535-47bb-0310-9956-ffa450edef68
2007-10-09 15:59:32 +00:00
Nick Kew
2b9aea3964 mod_proxy_http: Don't unescape/escape forward proxied URLs. Just check them.
PR 42592

also add fix to PR42572 to CHANGES (from r563487/r563489)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@583002 13f79535-47bb-0310-9956-ffa450edef68
2007-10-08 23:47:35 +00:00
Nick Kew
88ae472365 Purge tabs in r582631
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@582655 13f79535-47bb-0310-9956-ffa450edef68
2007-10-07 17:29:40 +00:00
Nick Kew
335f9ca193 mod_proxy_http: Correctly forward unexpected interim (HTTP 1xx) responses.
PR 16518


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@582631 13f79535-47bb-0310-9956-ffa450edef68
2007-10-07 13:43:26 +00:00
Nick Kew
1664984479 No change, but they won't let me have foo
(and ... this is the module with a function addit_dammit !!!)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@581030 13f79535-47bb-0310-9956-ffa450edef68
2007-10-01 18:08:13 +00:00
Nick Kew
b0c37384b3 Proxy: remove Warning headers with wrong date
PR 16138


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@580782 13f79535-47bb-0310-9956-ffa450edef68
2007-09-30 20:44:06 +00:00
Nick Kew
1508572821 Fix typo in header name "Trailer"
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@580465 13f79535-47bb-0310-9956-ffa450edef68
2007-09-28 19:23:27 +00:00
Nick Kew
19769d87d7 Fix processing of Connection headers in proxy
PR 43509


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@580457 13f79535-47bb-0310-9956-ffa450edef68
2007-09-28 18:50:57 +00:00
Nick Kew
54f22c4dc4 Fix adding out Via header in proxy response
PR 19439


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@580060 13f79535-47bb-0310-9956-ffa450edef68
2007-09-27 15:21:12 +00:00
Nick Kew
c27e86e49c Strip hop-by-hop headers in proxy response
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@580044 13f79535-47bb-0310-9956-ffa450edef68
2007-09-27 14:53:40 +00:00
Nick Kew
e2e15c26f5 Formatting. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@580019 13f79535-47bb-0310-9956-ffa450edef68
2007-09-27 14:20:21 +00:00
Jean-Frederic Clere
8a7f22fc54 Remove tabs.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@577349 13f79535-47bb-0310-9956-ffa450edef68
2007-09-19 16:40:26 +00:00
Nick Kew
8be6dff87c Propagate Proxy-Authorization header correctly
PR 25947
RFC2616 tells us:
  (1) If we haven't authenticated, we must pass the header on.
  (2) If we have authenticated, we MAY pass it on.
I've made the latter case configurable by ENV(Proxy-Chain-Auth).

Also, Proxy-Authenticate is a response header, and doesn't belong
in a check of request headers.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@574021 13f79535-47bb-0310-9956-ffa450edef68
2007-09-09 15:38:08 +00:00
Nick Kew
19d52e6884 Fix proxy-sendchunk(s|ed) problem
PR 43183


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@572000 13f79535-47bb-0310-9956-ffa450edef68
2007-09-02 15:10:29 +00:00
Nick Kew
c004da0231 proxy_http: don't wait for response body in a HEAD
PR 41644 [Stuart Children]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@571002 13f79535-47bb-0310-9956-ffa450edef68
2007-08-30 00:44:24 +00:00
Jean-Frederic Clere
988dc93196 create the brigate outside ap_proxygetline and reuse it.
correct the overflow handling. (returning APR_ENOSPC was
changing the behaviour).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@561778 13f79535-47bb-0310-9956-ffa450edef68
2007-08-01 12:20:34 +00:00
Jean-Frederic Clere
cd6a6923c2 Improve traces in ap_proxy_http_process_response().
That will help to investigate PR 37770. (errors from backend :-)).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@549420 13f79535-47bb-0310-9956-ffa450edef68
2007-06-21 08:01:30 +00:00
Jeff Trawick
8b9efbf9ca HTTP proxy ProxyErrorOverride: Leave 1xx and 3xx responses alone. Only
processing of error responses (4xx, 5xx) will be altered.

PR: 39245

This is based on a patch submitted by Bart van der Schans <schans hippo.nl>
and tweaked slightly by me based on discussions on dev@ since April 2006.
I think rpleum was the first to mention the 1xx issue.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@527969 13f79535-47bb-0310-9956-ffa450edef68
2007-04-12 15:07:11 +00:00
Justin Erenkrantz
df0aa883d5 Re-add "proxy-sendextracrlf" first introduced in r157478 and silently removed
in r219224.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@495808 13f79535-47bb-0310-9956-ffa450edef68
2007-01-13 01:02:46 +00:00
Ruediger Pluem
4f83ebed74 * Handle request bodies larger than 2 GB by converting the Content-Length
header string of the request correctly to apr_off_t.

PR: 40883


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@486320 13f79535-47bb-0310-9956-ffa450edef68
2006-12-12 21:22:36 +00:00
Jim Jagielski
3f66c0200f Minor nit: why make the logic more complex than it needs to
be ? :)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@437768 13f79535-47bb-0310-9956-ffa450edef68
2006-08-28 17:57:24 +00:00
Mladen Turk
9bbf36995e Cleanup: Remove close_on_recycle from proxy_conn_rec.
It behaves the same as close.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427959 13f79535-47bb-0310-9956-ffa450edef68
2006-08-02 12:03:42 +00:00
Roy T. Fielding
de659cbed0 update license header text
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:33:53 +00:00
Joe Orton
c13f8dd6eb * server/core.c (default_handler): Use apr_brigade_insert_file() to
append the file to the brigade.

* server/protocol.c (ap_send_fd),
modules/proxy/mod_proxy_http.c (spool_reqbody_cl), 
modules/cache/mod_mem_cache.c (recall_body),
modules/cache/mod_disk_cache.c (recall_body),
modules/mappers/mod_negotiation.c (handle_map_file),
modules/generators/mod_asis.c (asis_handler),
modules/dav/fs/repos.c [DEBUG_GET_HANDLER] (dav_fs_deliver),
modules/arch/win32/mod_isapi.c (ServerSupportFunction): Likewise.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@414238 13f79535-47bb-0310-9956-ffa450edef68
2006-06-14 13:16:29 +00:00
Colm MacCarthaigh
dd95d7c37c Update the copyright year in all .c, .h and .xml files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:11:27 +00:00
Ruediger Pluem
96c6356987 * Avoid calling ap_proxy_http_cleanup twice as this releases a connection
from the connection pool twice. This causes this connection to be present
  in the connection pool twice. Thus it may be used by different threads
  at the same time which causes many troubles (segfaults in this case).
  Furthermore implement a logic to prevent double releases to the connection
  pool if they are triggered by buggy code and log an error message in this
  case.

  - mod_proxy_http.c: remove double calls to ap_proxy_http_cleanup
  - proxy_util.c: Add logic to prevent double releases of a
    connection to the connection pool.

PR: 38793


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@394088 13f79535-47bb-0310-9956-ffa450edef68
2006-04-14 13:20:28 +00:00
Ruediger Pluem
70bd1f6329 * Disable persistent connections for SSL backends again as we do not
handle them correctly, because we recreate backend->connection for each
  request and thus try to initialize an already existing SSL connection.

Noticed by: Joe Orton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@379237 13f79535-47bb-0310-9956-ffa450edef68
2006-02-20 20:56:50 +00:00
Jim Jagielski
d05d878779 *) mod_proxy: Fix KeepAlives not being allowed and set to
backend servers. PR38602. [Ruediger Pluem, Jim Jagielski]

Also, document previous patch:
  *) Correctly initialize mod_proxy workers, which use a
     combination of local and shared datasets. Adjust logging
     to better trace usage. PR38403. [Jim Jagielski]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@378032 13f79535-47bb-0310-9956-ffa450edef68
2006-02-15 16:44:42 +00:00
Ruediger Pluem
df09bfe3f6 * Use the correct pool for apr_table_copy. Otherwise we trigger the bad pool
ancestry abort in apr_table_copy if apr is compiled with APR_POOL_DEBUG.

Noticed by: Joe Orton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@377525 13f79535-47bb-0310-9956-ffa450edef68
2006-02-13 22:58:03 +00:00
Ruediger Pluem
80aafcc1fc * Do not close the backend connection, because the client sent a
Connection: close header.

PR: 38524


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@377057 13f79535-47bb-0310-9956-ffa450edef68
2006-02-11 21:15:12 +00:00
Ruediger Pluem
859a572ba2 * Do not remove the connection headers from r->headers_in. They are needed
by the http output filter to create the correct connection response headers.
  Instead work on a copy of r->headers_in.

PR: 38524


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@377053 13f79535-47bb-0310-9956-ffa450edef68
2006-02-11 20:57:12 +00:00
Ruediger Pluem
6b17fc2596 * Call ap_proxy_http_cleanup after ap_log_rerror because it resets
backend->hostname to NULL.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@366279 13f79535-47bb-0310-9956-ffa450edef68
2006-01-05 21:02:36 +00:00
Ruediger Pluem
30d205d8a9 * Correctly signal broken backend connections up the chain also for the ajp
backend (see also r357461). Furthermore move common code in mod_proxy_http.c
  and mod_proxy_ajp.c into a new function (ap_proxy_backend_broke) in
  proxy_util.c.

  modules/proxy/mod_proxy_ajp.c : Signal broken backend connection for ajp backend
  modules/proxy/proxy_util.c    : Add ap_proxy_backend_broke
  modules/proxy/mod_proxy_http.c: - Use ap_proxy_backend_broke
                                  - Return DONE also if backend broke
  modules/proxy/mod_proxy.h     : Add declaration of ap_proxy_backend_broke


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@365374 13f79535-47bb-0310-9956-ffa450edef68
2006-01-02 16:39:22 +00:00
Jim Jagielski
d4f879aefa Morph the ap_http_broken_backend_filter() proxy "specific"
filter to a generic http error handling output filter.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@358022 13f79535-47bb-0310-9956-ffa450edef68
2005-12-20 15:50:37 +00:00
Ruediger Pluem
dcc563844c * If the mod_proxy backend connection broke in the middle of the response,
then
  - Do not cache it.
  - Signal the client that something went wrong by closing the connection
    and not sending the last-chunk marker if the response was T-E chunked.

server/core_filters.c         : Close the connection to the client by setting
                                c->keepalive to AP_CONN_CLOSE.
modules/http/chunk_filter.c   : Do not send last-chunk marker in the case
                                the backend broke.
modules/proxy/mod_proxy_http.c: Signal that the backend connection broke.
modules/cache/mod_disk_cache.c: Respect r->no_cache for discarding the response


Submitted by: Roy T. Fielding, Jim Jagielski, Ruediger Pluem
Reviewed by: Roy T. Fielding, Jim Jagielski, Ruediger Pluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@357461 13f79535-47bb-0310-9956-ffa450edef68
2005-12-18 12:07:39 +00:00