You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2001/04/09 00:18:33 UTC
cvs commit: httpd-proxy/module-2.0 mod_proxy.c mod_proxy.h proxy_connect.c proxy_ftp.c
minfrin 01/04/08 15:18:32
Modified: . CHANGES STATUS
module-2.0 mod_proxy.c mod_proxy.h proxy_connect.c
proxy_ftp.c
Log:
Stopped the CORE filter from sending off an HTTP response when a
CONNECT tunnel was closed. Fixed some filter definition madness that
proves that I need some sleep.
Revision Changes Path
1.19 +4 -0 httpd-proxy/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/httpd-proxy/CHANGES,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- CHANGES 2001/04/08 12:54:34 1.18
+++ CHANGES 2001/04/08 22:18:29 1.19
@@ -1,6 +1,10 @@
mod_proxy changes for 2.0.15 current
+ *) Stopped the CORE filter from sending off an HTTP response when a
+ CONNECT tunnel was closed.
+ [Graham Leggett <mi...@sharp.fm>]
+
*) Fixed the poll() loop in proxy_connect.c -> it works now!!!
[Graham Leggett <mi...@sharp.fm>]
1.11 +1 -8 httpd-proxy/STATUS
Index: STATUS
===================================================================
RCS file: /home/cvs/httpd-proxy/STATUS,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- STATUS 2001/04/08 12:56:26 1.10
+++ STATUS 2001/04/08 22:18:29 1.11
@@ -1,5 +1,5 @@
HTTPD PROXY STATUS:
-Last modified at [$Date: 2001/04/08 12:56:26 $]
+Last modified at [$Date: 2001/04/08 22:18:29 $]
Release:
@@ -28,13 +28,6 @@
a), b), c) below.
2.0
-
- * CONNECT - After the poll() loop has completed, the CORE output
- filter jumps on the bandwagon and sends out a status line and
- default headers at the end of the request.
- This behaviour needs to be suppressed - in fact the CORE filter
- should be replaced by a NULL filter the second tunnel behavior
- comes into effect.
* FTP - currently does not work properly either.
The function ap_getrc_msg() is designed to return the result code
1.36 +3 -2 httpd-proxy/module-2.0/mod_proxy.c
Index: mod_proxy.c
===================================================================
RCS file: /home/cvs/httpd-proxy/module-2.0/mod_proxy.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- mod_proxy.c 2001/04/06 14:25:52 1.35
+++ mod_proxy.c 2001/04/08 22:18:30 1.36
@@ -56,6 +56,8 @@
* University of Illinois, Urbana-Champaign.
*/
+#define CORE_PRIVATE
+
#include "mod_proxy.h"
/*
@@ -717,10 +719,9 @@
ap_hook_handler(proxy_handler, NULL, NULL, APR_HOOK_FIRST);
/* filename-to-URI translation */
ap_hook_translate_name(proxy_trans, NULL, NULL, APR_HOOK_FIRST);
-#ifdef FTP_FILTER
/* filters */
ap_register_output_filter("PROXY_SEND_DIR", ap_proxy_send_dir_filter, AP_FTYPE_CONNECTION);
-#endif
+ ap_register_output_filter("PROXY_NULL", ap_proxy_null_filter, AP_FTYPE_NETWORK);
/* fixups */
ap_hook_fixups(proxy_fixup, NULL, NULL, APR_HOOK_FIRST);
/* post read_request handling */
1.38 +10 -9 httpd-proxy/module-2.0/mod_proxy.h
Index: mod_proxy.h
===================================================================
RCS file: /home/cvs/httpd-proxy/module-2.0/mod_proxy.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- mod_proxy.h 2001/04/08 16:29:29 1.37
+++ mod_proxy.h 2001/04/08 22:18:31 1.38
@@ -90,19 +90,19 @@
#include "apr_pools.h"
#include "apr_strings.h"
-#include "util_filter.h"
-#include "util_date.h"
-#include "util_uri.h"
#include "httpd.h"
#include "http_config.h"
-#include "http_protocol.h"
#include "ap_config.h"
-#include "http_log.h"
-#include "http_main.h"
#include "http_core.h"
-#include "http_connection.h"
-#include "http_vhost.h"
+#include "http_protocol.h"
#include "http_request.h"
+#include "http_vhost.h"
+#include "http_main.h"
+#include "http_log.h"
+#include "http_connection.h"
+#include "util_filter.h"
+#include "util_date.h"
+#include "util_uri.h"
#include "mod_core.h"
@@ -223,12 +223,13 @@
int ap_proxy_connect_handler(request_rec *r, char *url,
const char *proxyhost, int proxyport);
+apr_status_t ap_proxy_null_filter(ap_filter_t *f, apr_bucket_brigade *bb);
/* proxy_ftp.c */
int ap_proxy_ftp_canon(request_rec *r, char *url);
int ap_proxy_ftp_handler(request_rec *r, char *url);
-apr_status_t ap_proxy_send_dir_filter(ap_filter_t *f, apr_bucket_brigade *bb, ap_input_mode_t mode);
+apr_status_t ap_proxy_send_dir_filter(ap_filter_t *f, apr_bucket_brigade *bb);
/* proxy_http.c */
1.32 +13 -6 httpd-proxy/module-2.0/proxy_connect.c
Index: proxy_connect.c
===================================================================
RCS file: /home/cvs/httpd-proxy/module-2.0/proxy_connect.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- proxy_connect.c 2001/04/08 14:52:19 1.31
+++ proxy_connect.c 2001/04/08 22:18:31 1.32
@@ -58,6 +58,8 @@
/* CONNECT method for Apache proxy */
+#define CORE_PRIVATE
+
#include "mod_proxy.h"
#if 0
@@ -102,6 +104,11 @@
return 0;
}
+/* a NULL filter for the connect tunnel */
+apr_status_t ap_proxy_null_filter(ap_filter_t *f, apr_bucket_brigade *bb)
+{
+ return APR_SUCCESS;
+}
int ap_proxy_connect_handler(request_rec *r, char *url,
const char *proxyname, int proxyport)
@@ -254,14 +261,14 @@
* Send the HTTP/1.1 CONNECT request to the remote server
*/
- /* XXXX FIXME: we are acting as a tunnel - the output filter stack should ideally
+ /* we are acting as a tunnel - the output filter stack should
* be completely empty, because when we are done here we are done completely.
- * Is there such a thing as a NULL filter?
+ * We add the NULL filter to the stack to do this...
*/
-/* r->output_filters = NULL;
- * r->connection->output_filters = NULL;
- * ap_add_output_filter("NULL", NULL, r, r->connection);
- */
+ r->output_filters = NULL;
+ r->connection->output_filters = NULL;
+ ap_add_output_filter("PROXY_NULL", NULL, r, r->connection);
+
/* If we are connecting through a remote proxy, we need to pass
* the CONNECT request on to it.
1.37 +1 -1 httpd-proxy/module-2.0/proxy_ftp.c
Index: proxy_ftp.c
===================================================================
RCS file: /home/cvs/httpd-proxy/module-2.0/proxy_ftp.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- proxy_ftp.c 2001/04/07 12:59:36 1.36
+++ proxy_ftp.c 2001/04/08 22:18:31 1.37
@@ -253,7 +253,7 @@
* all in good time...! :)
*/
-apr_status_t ap_proxy_send_dir_filter(ap_filter_t *f, apr_bucket_brigade *bb, ap_input_mode_t mode)
+apr_status_t ap_proxy_send_dir_filter(ap_filter_t *f, apr_bucket_brigade *bb)
{
conn_rec *c = f->r->connection;
apr_pool_t *p = f->r->pool;