[jetty-dev] ProxyServlet customizeExchange : add parameter response ?

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[jetty-dev] ProxyServlet customizeExchange : add parameter response ?

Thomas SEGISMONT
Hi,

I'm trying to build a http transparent proxy, similar to what you get
with Apache mod_proxy, ProxyPass and ProxyPassReverse. So I need to
intercept response headers sent by the back-end server ( Location,
Content-Location and URI).

I have a servlet which extends ProxyServlet.Transparent and overrides
method customizeExchange :

@Override
protected void customizeExchange(HttpExchange exchange,
HttpServletRequest request)
{
     exchange.setEventListener(new
ProxyEventListener(exchange.getEventListener(), request));
}

Here I miss a reference to the HttpServletResponse instance. I'd like to
have :

@Override
protected void customizeExchange(HttpExchange exchange,
HttpServletRequest request, HttpServletResponse response)
{
     exchange.setEventListener(new
ProxyEventListener(exchange.getEventListener(), request, response));
}

Would you accept a patch like this ? Or do you think there's another way
to do the job ?

Thanks
_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] ProxyServlet customizeExchange : add parameter response ?

Jesse McConnell
we will certainly take a look, need a coffee before I consider it
right or not :)

feel free to open a bugzilla and attached the patch or push the patch
into gerrit for review

https://git.eclipse.org/r/#/q/project:jetty/org.eclipse.jetty.project,n,z

cheers,
jesse

--
jesse mcconnell
[hidden email]



On Thu, Mar 1, 2012 at 05:02, Thomas SEGISMONT <[hidden email]> wrote:

> Hi,
>
> I'm trying to build a http transparent proxy, similar to what you get with
> Apache mod_proxy, ProxyPass and ProxyPassReverse. So I need to intercept
> response headers sent by the back-end server ( Location, Content-Location
> and URI).
>
> I have a servlet which extends ProxyServlet.Transparent and overrides method
> customizeExchange :
>
> @Override
> protected void customizeExchange(HttpExchange exchange, HttpServletRequest
> request)
> {
>    exchange.setEventListener(new
> ProxyEventListener(exchange.getEventListener(), request));
> }
>
> Here I miss a reference to the HttpServletResponse instance. I'd like to
> have :
>
> @Override
> protected void customizeExchange(HttpExchange exchange, HttpServletRequest
> request, HttpServletResponse response)
> {
>    exchange.setEventListener(new
> ProxyEventListener(exchange.getEventListener(), request, response));
> }
>
> Would you accept a patch like this ? Or do you think there's another way to
> do the job ?
>
> Thanks
> _______________________________________________
> jetty-dev mailing list
> [hidden email]
> https://dev.eclipse.org/mailman/listinfo/jetty-dev
_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] ProxyServlet customizeExchange : add parameter response ?

Thomas SEGISMONT
Hi,

Thanks for the quick answer and sorry for waking you up ;)

I'll push a changeset to gerrit. Which branch should I base the change on ?

Le 01/03/2012 12:48, Jesse McConnell a écrit :

> we will certainly take a look, need a coffee before I consider it
> right or not :)
>
> feel free to open a bugzilla and attached the patch or push the patch
> into gerrit for review
>
> https://git.eclipse.org/r/#/q/project:jetty/org.eclipse.jetty.project,n,z
>
> cheers,
> jesse
>
> --
> jesse mcconnell
> [hidden email]
>
>
>
> On Thu, Mar 1, 2012 at 05:02, Thomas SEGISMONT<[hidden email]>  wrote:
>> Hi,
>>
>> I'm trying to build a http transparent proxy, similar to what you get with
>> Apache mod_proxy, ProxyPass and ProxyPassReverse. So I need to intercept
>> response headers sent by the back-end server ( Location, Content-Location
>> and URI).
>>
>> I have a servlet which extends ProxyServlet.Transparent and overrides method
>> customizeExchange :
>>
>> @Override
>> protected void customizeExchange(HttpExchange exchange, HttpServletRequest
>> request)
>> {
>>     exchange.setEventListener(new
>> ProxyEventListener(exchange.getEventListener(), request));
>> }
>>
>> Here I miss a reference to the HttpServletResponse instance. I'd like to
>> have :
>>
>> @Override
>> protected void customizeExchange(HttpExchange exchange, HttpServletRequest
>> request, HttpServletResponse response)
>> {
>>     exchange.setEventListener(new
>> ProxyEventListener(exchange.getEventListener(), request, response));
>> }
>>
>> Would you accept a patch like this ? Or do you think there's another way to
>> do the job ?
>>
>> Thanks
>> _______________________________________________
>> jetty-dev mailing list
>> [hidden email]
>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
> _______________________________________________
> jetty-dev mailing list
> [hidden email]
> https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] ProxyServlet customizeExchange : add parameter response ?

Jesse McConnell
master pls

--
jesse mcconnell
[hidden email]



On Thu, Mar 1, 2012 at 06:43, Thomas SEGISMONT <[hidden email]> wrote:

> Hi,
>
> Thanks for the quick answer and sorry for waking you up ;)
>
> I'll push a changeset to gerrit. Which branch should I base the change on ?
>
> Le 01/03/2012 12:48, Jesse McConnell a écrit :
>
>> we will certainly take a look, need a coffee before I consider it
>> right or not :)
>>
>> feel free to open a bugzilla and attached the patch or push the patch
>> into gerrit for review
>>
>> https://git.eclipse.org/r/#/q/project:jetty/org.eclipse.jetty.project,n,z
>>
>> cheers,
>> jesse
>>
>> --
>> jesse mcconnell
>> [hidden email]
>>
>>
>>
>> On Thu, Mar 1, 2012 at 05:02, Thomas SEGISMONT<[hidden email]>
>>  wrote:
>>>
>>> Hi,
>>>
>>> I'm trying to build a http transparent proxy, similar to what you get
>>> with
>>> Apache mod_proxy, ProxyPass and ProxyPassReverse. So I need to intercept
>>> response headers sent by the back-end server ( Location, Content-Location
>>> and URI).
>>>
>>> I have a servlet which extends ProxyServlet.Transparent and overrides
>>> method
>>> customizeExchange :
>>>
>>> @Override
>>> protected void customizeExchange(HttpExchange exchange,
>>> HttpServletRequest
>>> request)
>>> {
>>>    exchange.setEventListener(new
>>> ProxyEventListener(exchange.getEventListener(), request));
>>> }
>>>
>>> Here I miss a reference to the HttpServletResponse instance. I'd like to
>>> have :
>>>
>>> @Override
>>> protected void customizeExchange(HttpExchange exchange,
>>> HttpServletRequest
>>> request, HttpServletResponse response)
>>> {
>>>    exchange.setEventListener(new
>>> ProxyEventListener(exchange.getEventListener(), request, response));
>>> }
>>>
>>> Would you accept a patch like this ? Or do you think there's another way
>>> to
>>> do the job ?
>>>
>>> Thanks
>>> _______________________________________________
>>> jetty-dev mailing list
>>> [hidden email]
>>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>>
>> _______________________________________________
>> jetty-dev mailing list
>> [hidden email]
>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>
>
> _______________________________________________
> jetty-dev mailing list
> [hidden email]
> https://dev.eclipse.org/mailman/listinfo/jetty-dev
_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] ProxyServlet customizeExchange : add parameter response ?

Thomas SEGISMONT
In reply to this post by Thomas SEGISMONT
Going further on my prototype, I realize that in order to add other
functionalities (back-end balancing, sticky sessions, ...) I'll need
more customizations than I pushed in this change set :
https://git.eclipse.org/r/#/c/5211/

So I have set it abandoned in Gerrit.

Are you interested in having such functionalities in ProxyServlet ? If
so i can push a more complete change set later.

Otherwise I'll make my own servlet (without taking into account backward
compatibility issues).

Cheers

Le 01/03/2012 13:43, Thomas SEGISMONT a écrit :

> Hi,
>
> Thanks for the quick answer and sorry for waking you up ;)
>
> I'll push a changeset to gerrit. Which branch should I base the change
> on ?
>
> Le 01/03/2012 12:48, Jesse McConnell a écrit :
>> we will certainly take a look, need a coffee before I consider it
>> right or not :)
>>
>> feel free to open a bugzilla and attached the patch or push the patch
>> into gerrit for review
>>
>> https://git.eclipse.org/r/#/q/project:jetty/org.eclipse.jetty.project,n,z 
>>
>>
>> cheers,
>> jesse
>>
>> --
>> jesse mcconnell
>> [hidden email]
>>
>>
>>
>> On Thu, Mar 1, 2012 at 05:02, Thomas SEGISMONT<[hidden email]>  
>> wrote:
>>> Hi,
>>>
>>> I'm trying to build a http transparent proxy, similar to what you
>>> get with
>>> Apache mod_proxy, ProxyPass and ProxyPassReverse. So I need to
>>> intercept
>>> response headers sent by the back-end server ( Location,
>>> Content-Location
>>> and URI).
>>>
>>> I have a servlet which extends ProxyServlet.Transparent and
>>> overrides method
>>> customizeExchange :
>>>
>>> @Override
>>> protected void customizeExchange(HttpExchange exchange,
>>> HttpServletRequest
>>> request)
>>> {
>>>     exchange.setEventListener(new
>>> ProxyEventListener(exchange.getEventListener(), request));
>>> }
>>>
>>> Here I miss a reference to the HttpServletResponse instance. I'd
>>> like to
>>> have :
>>>
>>> @Override
>>> protected void customizeExchange(HttpExchange exchange,
>>> HttpServletRequest
>>> request, HttpServletResponse response)
>>> {
>>>     exchange.setEventListener(new
>>> ProxyEventListener(exchange.getEventListener(), request, response));
>>> }
>>>
>>> Would you accept a patch like this ? Or do you think there's another
>>> way to
>>> do the job ?
>>>
>>> Thanks
>>> _______________________________________________
>>> jetty-dev mailing list
>>> [hidden email]
>>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>> _______________________________________________
>> jetty-dev mailing list
>> [hidden email]
>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>

_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] ProxyServlet customizeExchange : add parameter response ?

Jesse McConnell
I am interested to see what your doing and so long as its not going to
fundamentally break existing usage it would be nice to see the patch
for it.

where possible respect the existing api :)

cheers,
jesse

--
jesse mcconnell
[hidden email]



On Thu, Mar 1, 2012 at 11:54, Thomas SEGISMONT <[hidden email]> wrote:

> Going further on my prototype, I realize that in order to add other
> functionalities (back-end balancing, sticky sessions, ...) I'll need more
> customizations than I pushed in this change set :
> https://git.eclipse.org/r/#/c/5211/
>
> So I have set it abandoned in Gerrit.
>
> Are you interested in having such functionalities in ProxyServlet ? If so i
> can push a more complete change set later.
>
> Otherwise I'll make my own servlet (without taking into account backward
> compatibility issues).
>
> Cheers
>
> Le 01/03/2012 13:43, Thomas SEGISMONT a écrit :
>
>> Hi,
>>
>> Thanks for the quick answer and sorry for waking you up ;)
>>
>> I'll push a changeset to gerrit. Which branch should I base the change on
>> ?
>>
>> Le 01/03/2012 12:48, Jesse McConnell a écrit :
>>>
>>> we will certainly take a look, need a coffee before I consider it
>>> right or not :)
>>>
>>> feel free to open a bugzilla and attached the patch or push the patch
>>> into gerrit for review
>>>
>>> https://git.eclipse.org/r/#/q/project:jetty/org.eclipse.jetty.project,n,z
>>>
>>> cheers,
>>> jesse
>>>
>>> --
>>> jesse mcconnell
>>> [hidden email]
>>>
>>>
>>>
>>> On Thu, Mar 1, 2012 at 05:02, Thomas SEGISMONT<[hidden email]>
>>>  wrote:
>>>>
>>>> Hi,
>>>>
>>>> I'm trying to build a http transparent proxy, similar to what you get
>>>> with
>>>> Apache mod_proxy, ProxyPass and ProxyPassReverse. So I need to intercept
>>>> response headers sent by the back-end server ( Location,
>>>> Content-Location
>>>> and URI).
>>>>
>>>> I have a servlet which extends ProxyServlet.Transparent and overrides
>>>> method
>>>> customizeExchange :
>>>>
>>>> @Override
>>>> protected void customizeExchange(HttpExchange exchange,
>>>> HttpServletRequest
>>>> request)
>>>> {
>>>>    exchange.setEventListener(new
>>>> ProxyEventListener(exchange.getEventListener(), request));
>>>> }
>>>>
>>>> Here I miss a reference to the HttpServletResponse instance. I'd like to
>>>> have :
>>>>
>>>> @Override
>>>> protected void customizeExchange(HttpExchange exchange,
>>>> HttpServletRequest
>>>> request, HttpServletResponse response)
>>>> {
>>>>    exchange.setEventListener(new
>>>> ProxyEventListener(exchange.getEventListener(), request, response));
>>>> }
>>>>
>>>> Would you accept a patch like this ? Or do you think there's another way
>>>> to
>>>> do the job ?
>>>>
>>>> Thanks
>>>> _______________________________________________
>>>> jetty-dev mailing list
>>>> [hidden email]
>>>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>>>
>>> _______________________________________________
>>> jetty-dev mailing list
>>> [hidden email]
>>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>>
>>
>
> _______________________________________________
> jetty-dev mailing list
> [hidden email]
> https://dev.eclipse.org/mailman/listinfo/jetty-dev
_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] ProxyServlet customizeExchange : add parameter response ?

Thomas SEGISMONT
Hi Jesse,

Attached is the patch and an example usage. It's not finished yet but it
will look like this.

If you're interested in having this jettty-servlets, tell me. Of course
I'll add tests cases.

If you have any comments on the solution, I would appreciate.

Thanks

Le 01/03/2012 20:23, Jesse McConnell a écrit :

> I am interested to see what your doing and so long as its not going to
> fundamentally break existing usage it would be nice to see the patch
> for it.
>
> where possible respect the existing api :)
>
> cheers,
> jesse
>
> --
> jesse mcconnell
> [hidden email]
>
>
>
> On Thu, Mar 1, 2012 at 11:54, Thomas SEGISMONT<[hidden email]>  wrote:
>> Going further on my prototype, I realize that in order to add other
>> functionalities (back-end balancing, sticky sessions, ...) I'll need more
>> customizations than I pushed in this change set :
>> https://git.eclipse.org/r/#/c/5211/
>>
>> So I have set it abandoned in Gerrit.
>>
>> Are you interested in having such functionalities in ProxyServlet ? If so i
>> can push a more complete change set later.
>>
>> Otherwise I'll make my own servlet (without taking into account backward
>> compatibility issues).
>>
>> Cheers
>>
>> Le 01/03/2012 13:43, Thomas SEGISMONT a écrit :
>>
>>> Hi,
>>>
>>> Thanks for the quick answer and sorry for waking you up ;)
>>>
>>> I'll push a changeset to gerrit. Which branch should I base the change on
>>> ?
>>>
>>> Le 01/03/2012 12:48, Jesse McConnell a écrit :
>>>> we will certainly take a look, need a coffee before I consider it
>>>> right or not :)
>>>>
>>>> feel free to open a bugzilla and attached the patch or push the patch
>>>> into gerrit for review
>>>>
>>>> https://git.eclipse.org/r/#/q/project:jetty/org.eclipse.jetty.project,n,z
>>>>
>>>> cheers,
>>>> jesse
>>>>
>>>> --
>>>> jesse mcconnell
>>>> [hidden email]
>>>>
>>>>
>>>>
>>>> On Thu, Mar 1, 2012 at 05:02, Thomas SEGISMONT<[hidden email]>
>>>>   wrote:
>>>>> Hi,
>>>>>
>>>>> I'm trying to build a http transparent proxy, similar to what you get
>>>>> with
>>>>> Apache mod_proxy, ProxyPass and ProxyPassReverse. So I need to intercept
>>>>> response headers sent by the back-end server ( Location,
>>>>> Content-Location
>>>>> and URI).
>>>>>
>>>>> I have a servlet which extends ProxyServlet.Transparent and overrides
>>>>> method
>>>>> customizeExchange :
>>>>>
>>>>> @Override
>>>>> protected void customizeExchange(HttpExchange exchange,
>>>>> HttpServletRequest
>>>>> request)
>>>>> {
>>>>>     exchange.setEventListener(new
>>>>> ProxyEventListener(exchange.getEventListener(), request));
>>>>> }
>>>>>
>>>>> Here I miss a reference to the HttpServletResponse instance. I'd like to
>>>>> have :
>>>>>
>>>>> @Override
>>>>> protected void customizeExchange(HttpExchange exchange,
>>>>> HttpServletRequest
>>>>> request, HttpServletResponse response)
>>>>> {
>>>>>     exchange.setEventListener(new
>>>>> ProxyEventListener(exchange.getEventListener(), request, response));
>>>>> }
>>>>>
>>>>> Would you accept a patch like this ? Or do you think there's another way
>>>>> to
>>>>> do the job ?
>>>>>
>>>>> Thanks
>>>>> _______________________________________________
>>>>> jetty-dev mailing list
>>>>> [hidden email]
>>>>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>>>> _______________________________________________
>>>> jetty-dev mailing list
>>>> [hidden email]
>>>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>>>
>> _______________________________________________
>> jetty-dev mailing list
>> [hidden email]
>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
> _______________________________________________
> jetty-dev mailing list
> [hidden email]
> https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev

BalancerServlet.patch (19K) Download Attachment
BalancerServletExample.java (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] ProxyServlet customizeExchange : add parameter response ?

Jesse McConnell
Thomas,

Yes, at first blush this looks like something we could accept as a
patch, it seems that the existing proxy servlet just has a couple of
good changes in it and the old api is still there.  Not sure about the
tweaks to the continuation suspends in there but I would have to apply
the patch and look at it in the full context.

next steps once you are done with the tests and whatnot is to to open
a bug at bugs.eclipse.org for this issue under RT/Jetty

Then you can either upload the patch there or push it into the new
gerrit setup: https://git.eclipse.org/r/#/q/status:open+project:jetty/org.eclipse.jetty.project,n,z

I am looking forward to this, pretty cool stuff, nice job!

jesse

--
jesse mcconnell
[hidden email]



On Wed, Mar 7, 2012 at 05:02, Thomas SEGISMONT <[hidden email]> wrote:

> Hi Jesse,
>
> Attached is the patch and an example usage. It's not finished yet but it
> will look like this.
>
> If you're interested in having this jettty-servlets, tell me. Of course I'll
> add tests cases.
>
> If you have any comments on the solution, I would appreciate.
>
> Thanks
>
> Le 01/03/2012 20:23, Jesse McConnell a écrit :
>
>> I am interested to see what your doing and so long as its not going to
>> fundamentally break existing usage it would be nice to see the patch
>> for it.
>>
>> where possible respect the existing api :)
>>
>> cheers,
>> jesse
>>
>> --
>> jesse mcconnell
>> [hidden email]
>>
>>
>>
>> On Thu, Mar 1, 2012 at 11:54, Thomas SEGISMONT<[hidden email]>
>>  wrote:
>>>
>>> Going further on my prototype, I realize that in order to add other
>>> functionalities (back-end balancing, sticky sessions, ...) I'll need more
>>> customizations than I pushed in this change set :
>>> https://git.eclipse.org/r/#/c/5211/
>>>
>>> So I have set it abandoned in Gerrit.
>>>
>>> Are you interested in having such functionalities in ProxyServlet ? If so
>>> i
>>> can push a more complete change set later.
>>>
>>> Otherwise I'll make my own servlet (without taking into account backward
>>> compatibility issues).
>>>
>>> Cheers
>>>
>>> Le 01/03/2012 13:43, Thomas SEGISMONT a écrit :
>>>
>>>> Hi,
>>>>
>>>> Thanks for the quick answer and sorry for waking you up ;)
>>>>
>>>> I'll push a changeset to gerrit. Which branch should I base the change
>>>> on
>>>> ?
>>>>
>>>> Le 01/03/2012 12:48, Jesse McConnell a écrit :
>>>>>
>>>>> we will certainly take a look, need a coffee before I consider it
>>>>> right or not :)
>>>>>
>>>>> feel free to open a bugzilla and attached the patch or push the patch
>>>>> into gerrit for review
>>>>>
>>>>>
>>>>> https://git.eclipse.org/r/#/q/project:jetty/org.eclipse.jetty.project,n,z
>>>>>
>>>>> cheers,
>>>>> jesse
>>>>>
>>>>> --
>>>>> jesse mcconnell
>>>>> [hidden email]
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Mar 1, 2012 at 05:02, Thomas SEGISMONT<[hidden email]>
>>>>>  wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I'm trying to build a http transparent proxy, similar to what you get
>>>>>> with
>>>>>> Apache mod_proxy, ProxyPass and ProxyPassReverse. So I need to
>>>>>> intercept
>>>>>> response headers sent by the back-end server ( Location,
>>>>>> Content-Location
>>>>>> and URI).
>>>>>>
>>>>>> I have a servlet which extends ProxyServlet.Transparent and overrides
>>>>>> method
>>>>>> customizeExchange :
>>>>>>
>>>>>> @Override
>>>>>> protected void customizeExchange(HttpExchange exchange,
>>>>>> HttpServletRequest
>>>>>> request)
>>>>>> {
>>>>>>    exchange.setEventListener(new
>>>>>> ProxyEventListener(exchange.getEventListener(), request));
>>>>>> }
>>>>>>
>>>>>> Here I miss a reference to the HttpServletResponse instance. I'd like
>>>>>> to
>>>>>> have :
>>>>>>
>>>>>> @Override
>>>>>> protected void customizeExchange(HttpExchange exchange,
>>>>>> HttpServletRequest
>>>>>> request, HttpServletResponse response)
>>>>>> {
>>>>>>    exchange.setEventListener(new
>>>>>> ProxyEventListener(exchange.getEventListener(), request, response));
>>>>>> }
>>>>>>
>>>>>> Would you accept a patch like this ? Or do you think there's another
>>>>>> way
>>>>>> to
>>>>>> do the job ?
>>>>>>
>>>>>> Thanks
>>>>>> _______________________________________________
>>>>>> jetty-dev mailing list
>>>>>> [hidden email]
>>>>>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>>>>>
>>>>> _______________________________________________
>>>>> jetty-dev mailing list
>>>>> [hidden email]
>>>>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>>>>
>>>>
>>> _______________________________________________
>>> jetty-dev mailing list
>>> [hidden email]
>>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>>
>> _______________________________________________
>> jetty-dev mailing list
>> [hidden email]
>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>
>
>
> _______________________________________________
> jetty-dev mailing list
> [hidden email]
> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>
_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

[jetty-dev] Proposal for a BalancerServlet

Thomas SEGISMONT
Hi Jesse,

I have not been able to work further on this until those days. I have written a test case, pushed the code to gerrit and filed a bug :

https://bugs.eclipse.org/bugs/show_bug.cgi?id=376717

https://git.eclipse.org/r/#/c/5580/

BTW, I am no longer able to build the master branch with JDK6. Isn't 7.x version supposed to be built with JDK6 ? At first sight it comes from SPDY project not being built with JDK6 but still required in the assembly project.

Cheers
Thomas

Le 07/03/2012 15:21, Jesse McConnell a écrit :
Thomas,

Yes, at first blush this looks like something we could accept as a
patch, it seems that the existing proxy servlet just has a couple of
good changes in it and the old api is still there.  Not sure about the
tweaks to the continuation suspends in there but I would have to apply
the patch and look at it in the full context.

next steps once you are done with the tests and whatnot is to to open
a bug at bugs.eclipse.org for this issue under RT/Jetty

Then you can either upload the patch there or push it into the new
gerrit setup: https://git.eclipse.org/r/#/q/status:open+project:jetty/org.eclipse.jetty.project,n,z

I am looking forward to this, pretty cool stuff, nice job!

jesse

--
jesse mcconnell
[hidden email]



On Wed, Mar 7, 2012 at 05:02, Thomas SEGISMONT [hidden email] wrote:
Hi Jesse,

Attached is the patch and an example usage. It's not finished yet but it
will look like this.

If you're interested in having this jettty-servlets, tell me. Of course I'll
add tests cases.

If you have any comments on the solution, I would appreciate.

Thanks

Le 01/03/2012 20:23, Jesse McConnell a écrit :

I am interested to see what your doing and so long as its not going to
fundamentally break existing usage it would be nice to see the patch
for it.

where possible respect the existing api :)

cheers,
jesse

--
jesse mcconnell
[hidden email]



On Thu, Mar 1, 2012 at 11:54, Thomas SEGISMONT[hidden email]
 wrote:
Going further on my prototype, I realize that in order to add other
functionalities (back-end balancing, sticky sessions, ...) I'll need more
customizations than I pushed in this change set :
https://git.eclipse.org/r/#/c/5211/

So I have set it abandoned in Gerrit.

Are you interested in having such functionalities in ProxyServlet ? If so
i
can push a more complete change set later.

Otherwise I'll make my own servlet (without taking into account backward
compatibility issues).

Cheers

Le 01/03/2012 13:43, Thomas SEGISMONT a écrit :

Hi,

Thanks for the quick answer and sorry for waking you up ;)

I'll push a changeset to gerrit. Which branch should I base the change
on
?

Le 01/03/2012 12:48, Jesse McConnell a écrit :
we will certainly take a look, need a coffee before I consider it
right or not :)

feel free to open a bugzilla and attached the patch or push the patch
into gerrit for review


https://git.eclipse.org/r/#/q/project:jetty/org.eclipse.jetty.project,n,z

cheers,
jesse

--
jesse mcconnell
[hidden email]



On Thu, Mar 1, 2012 at 05:02, Thomas SEGISMONT[hidden email]
 wrote:
Hi,

I'm trying to build a http transparent proxy, similar to what you get
with
Apache mod_proxy, ProxyPass and ProxyPassReverse. So I need to
intercept
response headers sent by the back-end server ( Location,
Content-Location
and URI).

I have a servlet which extends ProxyServlet.Transparent and overrides
method
customizeExchange :

@Override
protected void customizeExchange(HttpExchange exchange,
HttpServletRequest
request)
{
   exchange.setEventListener(new
ProxyEventListener(exchange.getEventListener(), request));
}

Here I miss a reference to the HttpServletResponse instance. I'd like
to
have :

@Override
protected void customizeExchange(HttpExchange exchange,
HttpServletRequest
request, HttpServletResponse response)
{
   exchange.setEventListener(new
ProxyEventListener(exchange.getEventListener(), request, response));
}

Would you accept a patch like this ? Or do you think there's another
way
to
do the job ?

Thanks
_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev
_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev
_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] Proposal for a BalancerServlet

Thomas Becker
Hi Thomas,

regarding your jdk6 build issues. We've maven configured to only build
the jetty-spdy projects when ran with jdk7. I will doublecheck if that
still works.

Cheers,
Thomas

On Fri Apr 13 16:08:46 2012, Thomas SEGISMONT wrote:

> Hi Jesse,
>
> I have not been able to work further on this until those days. I have
> written a test case, pushed the code to gerrit and filed a bug :
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=376717
>
> https://git.eclipse.org/r/#/c/5580/
>
> BTW, I am no longer able to build the master branch with JDK6. Isn't
> 7.x version supposed to be built with JDK6 ? At first sight it comes
> from SPDY project not being built with JDK6 but still required in the
> assembly project.
>
> Cheers
> Thomas
>
> Le 07/03/2012 15:21, Jesse McConnell a écrit :
>> Thomas,
>>
>> Yes, at first blush this looks like something we could accept as a
>> patch, it seems that the existing proxy servlet just has a couple of
>> good changes in it and the old api is still there.  Not sure about the
>> tweaks to the continuation suspends in there but I would have to apply
>> the patch and look at it in the full context.
>>
>> next steps once you are done with the tests and whatnot is to to open
>> a bug at bugs.eclipse.org for this issue under RT/Jetty
>>
>> Then you can either upload the patch there or push it into the new
>> gerrit setup:https://git.eclipse.org/r/#/q/status:open+project:jetty/org.eclipse.jetty.project,n,z
>>
>> I am looking forward to this, pretty cool stuff, nice job!
>>
>> jesse
>>
>> --
>> jesse mcconnell
>> [hidden email]
>>
>>
>>
>> On Wed, Mar 7, 2012 at 05:02, Thomas SEGISMONT<[hidden email]>  wrote:
>>> Hi Jesse,
>>>
>>> Attached is the patch and an example usage. It's not finished yet but it
>>> will look like this.
>>>
>>> If you're interested in having this jettty-servlets, tell me. Of course I'll
>>> add tests cases.
>>>
>>> If you have any comments on the solution, I would appreciate.
>>>
>>> Thanks
>>>
>>> Le 01/03/2012 20:23, Jesse McConnell a écrit :
>>>
>>>> I am interested to see what your doing and so long as its not going to
>>>> fundamentally break existing usage it would be nice to see the patch
>>>> for it.
>>>>
>>>> where possible respect the existing api :)
>>>>
>>>> cheers,
>>>> jesse
>>>>
>>>> --
>>>> jesse mcconnell
>>>> [hidden email]
>>>>
>>>>
>>>>
>>>> On Thu, Mar 1, 2012 at 11:54, Thomas SEGISMONT<[hidden email]>
>>>>   wrote:
>>>>> Going further on my prototype, I realize that in order to add other
>>>>> functionalities (back-end balancing, sticky sessions, ...) I'll need more
>>>>> customizations than I pushed in this change set :
>>>>> https://git.eclipse.org/r/#/c/5211/
>>>>>
>>>>> So I have set it abandoned in Gerrit.
>>>>>
>>>>> Are you interested in having such functionalities in ProxyServlet ? If so
>>>>> i
>>>>> can push a more complete change set later.
>>>>>
>>>>> Otherwise I'll make my own servlet (without taking into account backward
>>>>> compatibility issues).
>>>>>
>>>>> Cheers
>>>>>
>>>>> Le 01/03/2012 13:43, Thomas SEGISMONT a écrit :
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Thanks for the quick answer and sorry for waking you up ;)
>>>>>>
>>>>>> I'll push a changeset to gerrit. Which branch should I base the change
>>>>>> on
>>>>>> ?
>>>>>>
>>>>>> Le 01/03/2012 12:48, Jesse McConnell a écrit :
>>>>>>> we will certainly take a look, need a coffee before I consider it
>>>>>>> right or not :)
>>>>>>>
>>>>>>> feel free to open a bugzilla and attached the patch or push the patch
>>>>>>> into gerrit for review
>>>>>>>
>>>>>>>
>>>>>>> https://git.eclipse.org/r/#/q/project:jetty/org.eclipse.jetty.project,n,z
>>>>>>>
>>>>>>> cheers,
>>>>>>> jesse
>>>>>>>
>>>>>>> --
>>>>>>> jesse mcconnell
>>>>>>> [hidden email]
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Mar 1, 2012 at 05:02, Thomas SEGISMONT<[hidden email]>
>>>>>>>   wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I'm trying to build a http transparent proxy, similar to what you get
>>>>>>>> with
>>>>>>>> Apache mod_proxy, ProxyPass and ProxyPassReverse. So I need to
>>>>>>>> intercept
>>>>>>>> response headers sent by the back-end server ( Location,
>>>>>>>> Content-Location
>>>>>>>> and URI).
>>>>>>>>
>>>>>>>> I have a servlet which extends ProxyServlet.Transparent and overrides
>>>>>>>> method
>>>>>>>> customizeExchange :
>>>>>>>>
>>>>>>>> @Override
>>>>>>>> protected void customizeExchange(HttpExchange exchange,
>>>>>>>> HttpServletRequest
>>>>>>>> request)
>>>>>>>> {
>>>>>>>>     exchange.setEventListener(new
>>>>>>>> ProxyEventListener(exchange.getEventListener(), request));
>>>>>>>> }
>>>>>>>>
>>>>>>>> Here I miss a reference to the HttpServletResponse instance. I'd like
>>>>>>>> to
>>>>>>>> have :
>>>>>>>>
>>>>>>>> @Override
>>>>>>>> protected void customizeExchange(HttpExchange exchange,
>>>>>>>> HttpServletRequest
>>>>>>>> request, HttpServletResponse response)
>>>>>>>> {
>>>>>>>>     exchange.setEventListener(new
>>>>>>>> ProxyEventListener(exchange.getEventListener(), request, response));
>>>>>>>> }
>>>>>>>>
>>>>>>>> Would you accept a patch like this ? Or do you think there's another
>>>>>>>> way
>>>>>>>> to
>>>>>>>> do the job ?
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> _______________________________________________
>>>>>>>> jetty-dev mailing list
>>>>>>>> [hidden email]
>>>>>>>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>>>>>>> _______________________________________________
>>>>>>> jetty-dev mailing list
>>>>>>> [hidden email]
>>>>>>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>>>>>>
>>>>> _______________________________________________
>>>>> jetty-dev mailing list
>>>>> [hidden email]
>>>>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>>>> _______________________________________________
>>>> jetty-dev mailing list
>>>> [hidden email]
>>>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>>>
>>>
>>> _______________________________________________
>>> jetty-dev mailing list
>>> [hidden email]
>>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>>>
>> _______________________________________________
>> jetty-dev mailing list
>> [hidden email]
>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>
>
>
> _______________________________________________
> jetty-dev mailing list
> [hidden email]
> https://dev.eclipse.org/mailman/listinfo/jetty-dev

--
thomas becker
[hidden email]

http://webtide.com / http://intalio.com
(the folks behind jetty and cometd)
_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] Proposal for a BalancerServlet

Thomas Becker
In reply to this post by Thomas SEGISMONT
Thomas, here's the bug for the broken build:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=376730

Btw. thanks a lot for the balancer stuff. Neat!

On 4/13/12 4:08 PM, Thomas SEGISMONT wrote:
Hi Jesse,

I have not been able to work further on this until those days. I have written a test case, pushed the code to gerrit and filed a bug :

https://bugs.eclipse.org/bugs/show_bug.cgi?id=376717

https://git.eclipse.org/r/#/c/5580/

BTW, I am no longer able to build the master branch with JDK6. Isn't 7.x version supposed to be built with JDK6 ? At first sight it comes from SPDY project not being built with JDK6 but still required in the assembly project.

Cheers
Thomas

Le 07/03/2012 15:21, Jesse McConnell a écrit :
Thomas,

Yes, at first blush this looks like something we could accept as a
patch, it seems that the existing proxy servlet just has a couple of
good changes in it and the old api is still there.  Not sure about the
tweaks to the continuation suspends in there but I would have to apply
the patch and look at it in the full context.

next steps once you are done with the tests and whatnot is to to open
a bug at bugs.eclipse.org for this issue under RT/Jetty

Then you can either upload the patch there or push it into the new
gerrit setup: https://git.eclipse.org/r/#/q/status:open+project:jetty/org.eclipse.jetty.project,n,z

I am looking forward to this, pretty cool stuff, nice job!

jesse

--
jesse mcconnell
[hidden email]



On Wed, Mar 7, 2012 at 05:02, Thomas SEGISMONT [hidden email] wrote:
Hi Jesse,

Attached is the patch and an example usage. It's not finished yet but it
will look like this.

If you're interested in having this jettty-servlets, tell me. Of course I'll
add tests cases.

If you have any comments on the solution, I would appreciate.

Thanks

Le 01/03/2012 20:23, Jesse McConnell a écrit :

I am interested to see what your doing and so long as its not going to
fundamentally break existing usage it would be nice to see the patch
for it.

where possible respect the existing api :)

cheers,
jesse

--
jesse mcconnell
[hidden email]



On Thu, Mar 1, 2012 at 11:54, Thomas SEGISMONT[hidden email]
 wrote:
Going further on my prototype, I realize that in order to add other
functionalities (back-end balancing, sticky sessions, ...) I'll need more
customizations than I pushed in this change set :
https://git.eclipse.org/r/#/c/5211/

So I have set it abandoned in Gerrit.

Are you interested in having such functionalities in ProxyServlet ? If so
i
can push a more complete change set later.

Otherwise I'll make my own servlet (without taking into account backward
compatibility issues).

Cheers

Le 01/03/2012 13:43, Thomas SEGISMONT a écrit :

Hi,

Thanks for the quick answer and sorry for waking you up ;)

I'll push a changeset to gerrit. Which branch should I base the change
on
?

Le 01/03/2012 12:48, Jesse McConnell a écrit :
we will certainly take a look, need a coffee before I consider it
right or not :)

feel free to open a bugzilla and attached the patch or push the patch
into gerrit for review


https://git.eclipse.org/r/#/q/project:jetty/org.eclipse.jetty.project,n,z

cheers,
jesse

--
jesse mcconnell
[hidden email]



On Thu, Mar 1, 2012 at 05:02, Thomas SEGISMONT[hidden email]
 wrote:
Hi,

I'm trying to build a http transparent proxy, similar to what you get
with
Apache mod_proxy, ProxyPass and ProxyPassReverse. So I need to
intercept
response headers sent by the back-end server ( Location,
Content-Location
and URI).

I have a servlet which extends ProxyServlet.Transparent and overrides
method
customizeExchange :

@Override
protected void customizeExchange(HttpExchange exchange,
HttpServletRequest
request)
{
   exchange.setEventListener(new
ProxyEventListener(exchange.getEventListener(), request));
}

Here I miss a reference to the HttpServletResponse instance. I'd like
to
have :

@Override
protected void customizeExchange(HttpExchange exchange,
HttpServletRequest
request, HttpServletResponse response)
{
   exchange.setEventListener(new
ProxyEventListener(exchange.getEventListener(), request, response));
}

Would you accept a patch like this ? Or do you think there's another
way
to
do the job ?

Thanks
_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev
_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev

              
_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev
_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev



_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev

-- 
thomas becker
[hidden email]

http://webtide.com / http://intalio.com
(the folks behind jetty and cometd)

_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] Proposal for a BalancerServlet

Thomas SEGISMONT
Thanks !

Le 13/04/2012 17:13, Thomas Becker a écrit :
Thomas, here's the bug for the broken build:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=376730

Btw. thanks a lot for the balancer stuff. Neat!

On 4/13/12 4:08 PM, Thomas SEGISMONT wrote:
Hi Jesse,

I have not been able to work further on this until those days. I have written a test case, pushed the code to gerrit and filed a bug :

https://bugs.eclipse.org/bugs/show_bug.cgi?id=376717

https://git.eclipse.org/r/#/c/5580/

BTW, I am no longer able to build the master branch with JDK6. Isn't 7.x version supposed to be built with JDK6 ? At first sight it comes from SPDY project not being built with JDK6 but still required in the assembly project.

Cheers
Thomas

Le 07/03/2012 15:21, Jesse McConnell a écrit :
Thomas,

Yes, at first blush this looks like something we could accept as a
patch, it seems that the existing proxy servlet just has a couple of
good changes in it and the old api is still there.  Not sure about the
tweaks to the continuation suspends in there but I would have to apply
the patch and look at it in the full context.

next steps once you are done with the tests and whatnot is to to open
a bug at bugs.eclipse.org for this issue under RT/Jetty

Then you can either upload the patch there or push it into the new
gerrit setup: https://git.eclipse.org/r/#/q/status:open+project:jetty/org.eclipse.jetty.project,n,z

I am looking forward to this, pretty cool stuff, nice job!

jesse

--
jesse mcconnell
[hidden email]



On Wed, Mar 7, 2012 at 05:02, Thomas SEGISMONT [hidden email] wrote:
Hi Jesse,

Attached is the patch and an example usage. It's not finished yet but it
will look like this.

If you're interested in having this jettty-servlets, tell me. Of course I'll
add tests cases.

If you have any comments on the solution, I would appreciate.

Thanks

Le 01/03/2012 20:23, Jesse McConnell a écrit :

I am interested to see what your doing and so long as its not going to
fundamentally break existing usage it would be nice to see the patch
for it.

where possible respect the existing api :)

cheers,
jesse

--
jesse mcconnell
[hidden email]



On Thu, Mar 1, 2012 at 11:54, Thomas SEGISMONT[hidden email]
 wrote:
Going further on my prototype, I realize that in order to add other
functionalities (back-end balancing, sticky sessions, ...) I'll need more
customizations than I pushed in this change set :
https://git.eclipse.org/r/#/c/5211/

So I have set it abandoned in Gerrit.

Are you interested in having such functionalities in ProxyServlet ? If so
i
can push a more complete change set later.

Otherwise I'll make my own servlet (without taking into account backward
compatibility issues).

Cheers

Le 01/03/2012 13:43, Thomas SEGISMONT a écrit :

Hi,

Thanks for the quick answer and sorry for waking you up ;)

I'll push a changeset to gerrit. Which branch should I base the change
on
?

Le 01/03/2012 12:48, Jesse McConnell a écrit :
we will certainly take a look, need a coffee before I consider it
right or not :)

feel free to open a bugzilla and attached the patch or push the patch
into gerrit for review


https://git.eclipse.org/r/#/q/project:jetty/org.eclipse.jetty.project,n,z

cheers,
jesse

--
jesse mcconnell
[hidden email]



On Thu, Mar 1, 2012 at 05:02, Thomas SEGISMONT[hidden email]
 wrote:
Hi,

I'm trying to build a http transparent proxy, similar to what you get
with
Apache mod_proxy, ProxyPass and ProxyPassReverse. So I need to
intercept
response headers sent by the back-end server ( Location,
Content-Location
and URI).

I have a servlet which extends ProxyServlet.Transparent and overrides
method
customizeExchange :

@Override
protected void customizeExchange(HttpExchange exchange,
HttpServletRequest
request)
{
   exchange.setEventListener(new
ProxyEventListener(exchange.getEventListener(), request));
}

Here I miss a reference to the HttpServletResponse instance. I'd like
to
have :

@Override
protected void customizeExchange(HttpExchange exchange,
HttpServletRequest
request, HttpServletResponse response)
{
   exchange.setEventListener(new
ProxyEventListener(exchange.getEventListener(), request, response));
}

Would you accept a patch like this ? Or do you think there's another
way
to
do the job ?

Thanks
_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev
_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev
_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev
_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev
_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev



_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev

-- 
thomas becker
[hidden email]

http://webtide.com / http://intalio.com
(the folks behind jetty and cometd)


_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-dev