Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

A problem with the CORE filter and tunnelling

From: Graham Leggett <minfrin(at)sharp.fm>
Date: Sun Apr 08 2001 - 12:01:32 EDT


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 127.0.0.1 80
	Trying 127.0.0.1...
	Connected to 127.0.0.1.
	Escape character is '^]'.
	CONNECT 127.0.0.1:21 HTTP/1.0
	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
connection

    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?

  1. signal somehow to the core filter that it must not send anything - if so, how?
  2. remove all the filters from the output filter stack, and replace them with a NULL filter that does this:

static int null_filter() {

Do you need help?X

    return APR_SUCCESS;
}

c) something else?

Regards,
Graham

-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."
Received on Sun Apr 08 16:03:13 2001

This archive was generated by hypermail 2.1.8 : Thu Aug 24 2006 - 14:53:15 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library