> On Mar 31, 2016, at 2:14 PM, Steven Schlansker <[email protected]> 
> wrote:
> 
> Hello jetty-users,
> 
> I am investigating configuring the Proxy connector support as described in
> http://www.eclipse.org/jetty/documentation/current/configuring-connectors.html
> 
> One thing that I don't feel clear in the documentation is how you might 
> configure
> Jetty to accept e.g. both HTTP and Proxy+HTTP connections on the same 
> ServerConnector.
> 
> Looking at the code, in fact I'm not sure this is possible -- it seems that 
> if you
> don't have a PROXY connection it just gives up:
> 
> // Check proxy
> if (!"PROXY".equals(_field[0]))
> {
>    LOG.warn("Not PROXY protocol for {}",getEndPoint());
>    close();
>    return;
> }

I've spent a couple of hours digging into this.

It looks like it is not possible today, or at least it's really not
obvious.  I'm seeing support for interfaces "UpgradeFrom" and "UpgradeTo"
used to hand off buffers from one type of Connection to the next
through an EndPoint.upgrade

Unfortunately, it seems that neither Proxy v1 nor v2 support UpgradeFrom,
HTTP only supports UpgradeFrom, and HTTPs neither -- when both would need 
UpgradeTo.

I'm considering contributing the following changes:

* Implement HttpConnection UpgradeTo
* Implement SslConnection UpgradeTo
* Implement ProxyProtocolV*Connection UpgradeFrom

Is this the right path to be going down?  Is this a valuable contribution?
Has anyone considered working on this, and maybe could do it much more quickly
than I can?

Thanks again,
Steven

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to