Forward http message as is

rzo rzo at gmx.de
Thu Dec 31 09:00:23 EST 2009


Hello,

I tried adding a new article to the wiki, but it hangs when I click the 
create new article.
I will try again later.

-- ron

On 29.12.2009 01:53, "Trustin Lee (이희승)" wrote:
> Hello Ron,
>
> It would be great if you can share the code with the community.
>
> Although you can use the Nabble forum to attach a file to your post.  I
> would rather recommend to paste your code to the wiki:
>
>    http://community.jboss.org/wiki/Netty
>
> Thanks a lot!
> Trustin
>
> rzo at gmx.de wrote:
>    
>> Hello,
>>
>> I have implemented this using netty.
>> I have implemented a proxy+waf (web application firewall)
>> It gets the http requests, analyzes them and if ok forwards the original stream to the web server. The HttpResponse is directly forwarded back to the client.
>>
>> The handlers are as follows:
>>
>> InterceptorHandler: onMessageReceived: store a copy of the message
>> HttpRequestHandler: parse the http request, if ok forward channel opened and the http request further upstream.
>> WafHandler: check the http request. if ok get the "bytes" from the interceptor and call next handler.
>> ProxyHandlers: as in the netty examples.
>>
>> If you are interested I can post the code.
>> Should I add it as a patch ? or is it possible to attach files to this mailing list ?
>>
>> -- Ron
>> http://yajsw.sourceforge.net
>>
>> -------- Original-Nachricht --------
>>      
>>> Datum: Mon, 28 Dec 2009 21:06:24 +0900
>>> Von: "Trustin Lee (이희승)"<trustin at gmail.com>
>>> An: Netty Users<netty-users at lists.jboss.org>
>>> Betreff: Re: Forward http message as is
>>>        
>>      
>>> Hi Leandro,
>>>
>>> Currently, it's not possible without modifying the existing decoder
>>> implementation.  Because this feature has been requested sometimes, I
>>> will make sure to take into account for the next release.
>>>
>>> Thanks,
>>> Trustin
>>>
>>> Leandro Cruz wrote:
>>>        
>>>> Hi All,
>>>>
>>>> I'm trying to create a generic proxy (http, msn, etc) using netty.
>>>> I've checked out the proxy example, which is very nice.
>>>>
>>>> What I'd like to do is add the HttpRequestDecoder to the pipeline (so I
>>>> have a HttpRequest on messageReceived()), but forward the original
>>>> request (ChannelBuffer) to the original host/server.
>>>>
>>>> Today this is not possible because HttpMessageDecoder uses
>>>> a ReplayingDecoderBuffer, which doesn't give me access to the "internal"
>>>> buffer/bytes. Another problem is that HttpRequest.getContent() is not a
>>>> replica of the original ChannelBuffer.
>>>>
>>>> Ant ideas?
>>>>
>>>> -
>>>> Leandro Rodrigo Saad Cruz
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> netty-users mailing list
>>>> netty-users at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/netty-users
>>>>          
>>      
>    
>
>
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20091231/9a03b928/attachment.html 


More information about the netty-users mailing list