[Jetty-support] HTTP Tunneling via CONNECT

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Jetty-support] HTTP Tunneling via CONNECT

Martin Ždila-2
Hello

I am using Jetty 6.11 and need to process HTTP Tunneling via CONNECT HTTP
Method. I failed to configure jetty to forward CONNECT method to the servlet.
The problem is that in the org.mortbay.jetty.handler.ContextHandler.handle
method the parameter "target" is used to check if it matches with context
path of the servlet. The target is "443" in case of HTTPS tunneling and so it
can match with no context path (neither /* or .*). The target is result of
connection.getRequest().getPathInfo();

Is there a way to handle CONNECT method better without writing custom
ContextHandler?

Thanks in advance.

--
Martin Zdila
CTO

M-Way Solutions Slovakia s.r.o.
Letna 27, 040 01 Kosice
Slovakia

tel:+421-908-363-848
mailto:[hidden email]
http://www.mwaysolutions.com
xmpp:[hidden email] (Jabber)
skype:m.zdila

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support



Reply | Threaded
Open this post in threaded view
|

Re: [Jetty-support] HTTP Tunneling via CONNECT

Jan Bartel
Martin,

We have 2 proxy servlets, both a little experimental which you might want to take a look at:

https://svn.codehaus.org/jetty/jetty/trunk/modules/extra/jetty-servlet/src/main/java/org/mortbay/servlet/ProxyServlet.java
https://svn.codehaus.org/jetty/jetty/trunk/modules/extra/jetty-client/src/main/java/org/mortbay/servlet/AsyncProxyServlet.java

I was under the impression that both of those should work when dropped into your webapp,
assuming you've configured ssl correctly (you're terminating the ssl on jetty, yes?), but
I might be mistaken or software rot may have set it. In any case, please try those
servlets and see if that clarifies things at all.

cheers
Jan

Martin Zdila wrote:

> Hello
>
> I am using Jetty 6.11 and need to process HTTP Tunneling via CONNECT HTTP
> Method. I failed to configure jetty to forward CONNECT method to the servlet.
> The problem is that in the org.mortbay.jetty.handler.ContextHandler.handle
> method the parameter "target" is used to check if it matches with context
> path of the servlet. The target is "443" in case of HTTPS tunneling and so it
> can match with no context path (neither /* or .*). The target is result of
> connection.getRequest().getPathInfo();
>
> Is there a way to handle CONNECT method better without writing custom
> ContextHandler?
>
> Thanks in advance.
>


--
Jan Bartel, Webtide LLC | [hidden email] | http://www.webtide.com

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support



Reply | Threaded
Open this post in threaded view
|

Re: [Jetty-support] HTTP Tunneling via CONNECT

Jesse McConnell
*cough* also this list has been deprecated, please to be using the
[hidden email] mailing list which I have cc'd this message
over to :)

cheers!

On Thu, Jun 26, 2008 at 7:58 PM, Jan Bartel <[hidden email]> wrote:

> Martin,
>
> We have 2 proxy servlets, both a little experimental which you might want to take a look at:
>
> https://svn.codehaus.org/jetty/jetty/trunk/modules/extra/jetty-servlet/src/main/java/org/mortbay/servlet/ProxyServlet.java
> https://svn.codehaus.org/jetty/jetty/trunk/modules/extra/jetty-client/src/main/java/org/mortbay/servlet/AsyncProxyServlet.java
>
> I was under the impression that both of those should work when dropped into your webapp,
> assuming you've configured ssl correctly (you're terminating the ssl on jetty, yes?), but
> I might be mistaken or software rot may have set it. In any case, please try those
> servlets and see if that clarifies things at all.
>
> cheers
> Jan
>
> Martin Zdila wrote:
>> Hello
>>
>> I am using Jetty 6.11 and need to process HTTP Tunneling via CONNECT HTTP
>> Method. I failed to configure jetty to forward CONNECT method to the servlet.
>> The problem is that in the org.mortbay.jetty.handler.ContextHandler.handle
>> method the parameter "target" is used to check if it matches with context
>> path of the servlet. The target is "443" in case of HTTPS tunneling and so it
>> can match with no context path (neither /* or .*). The target is result of
>> connection.getRequest().getPathInfo();
>>
>> Is there a way to handle CONNECT method better without writing custom
>> ContextHandler?
>>
>> Thanks in advance.
>>
>
>
> --
> Jan Bartel, Webtide LLC | [hidden email] | http://www.webtide.com
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Jetty-support mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jetty-support
>



--
jesse mcconnell
[hidden email]

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support