httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <>
Subject A problem with the CORE filter and tunnelling
Date Sun, 08 Apr 2001 16:01:32 GMT
Hi all,

I am having a problem with the CONNECT part of the proxy, and need some
help to solve this one.

The SSL tunnel functionality is currently working great - a
bidirectional tunnel is set up between client and remote server, and
data flows normally in both directions over the link until either side
breaks the connection.

The trouble is that being a tunnel, the CONNECT module handles all it's
own data transfer using APR. (None of the filters should be touching the
data, so they are bypassed). Once the connection is finished, the CORE
filter suddenly jumps in and tacks the as-unsent HTTP/1.1 response line
to the end of the request, like this:

(Using an ftp remote server as an example)

	[root@jessica httpd-2.0]# telnet 80
	Connected to
	Escape character is '^]'.
	User-Agent: Fred

	HTTP/1.0 200 Connection Established
	Proxy-agent: Apache/2.0.16-dev (Unix)

	220 ProFTPD 1.2.0pre10 Server (ProFTPD) [jessica]
	USER ftp
	331 Anonymous login ok, send your complete e-mail address as password.
--> at this point the ftp server is killed, and thus the remote
    is closed. Apache now adds this: >--
	HTTP/1.1 200 OK
	Date: Sun, 08 Apr 2001 15:45:11 GMT
	Server: Apache/2.0.16-dev (Unix)
	Content-Length: 0
	Connection: close
	Content-Type: text/plain; charset=ISO-8859-1

	Connection closed by foreign host.

Obviously the CORE filter, having never got to do it's "send headers"
thing, is jumping in (too late of course) and finishing the job. What
needs to happen is that the filter be removed or disabled somehow, the
question is, how?

a) signal somehow to the core filter that it must not send anything - if
so, how?

b) remove all the filters from the output filter stack, and replace them
with a NULL filter that does this:

static int null_filter() {
    return APR_SUCCESS;

c) something else?

-----------------------------------------		"There's a moon
					over Bourbon Street

View raw message