[Rabbit-dev] bad url request error

Romain Godefroy rgodefroy at thalos.fr
Mon Jan 30 19:13:19 CET 2012


I suggest to add this code in HttpHeaderReader.java, after line 139:

             // try to read some more
             buffer.position (pos);
             startParseAt = 0;

It seems to solve the problem.
Do you think it's a good patch?

Thank you

Le 30/01/2012 16:56, Romain Godefroy a écrit :
> Hi,
>
> Our rabbit proxy is used through sattelite links. With this kind of 
> network, the first TCP/IP packets are sometimes very small (96 bytes). 
> Then we got this exception:
>
> 30 janv. 2012 14:51:21 rabbit.filter.ProxyAuth getError
> ATTENTION: Bad url: HTTP/1.1
> java.net.MalformedURLException: no protocol: HTTP/1.1
>     at java.net.URL.<init>(URL.java:583)
>     at java.net.URL.<init>(URL.java:480)
>     at java.net.URL.<init>(URL.java:429)
>     at rabbit.filter.ProxyAuth.getError(ProxyAuth.java:96)
>     at rabbit.filter.ProxyAuth.doHttpInFiltering(ProxyAuth.java:53)
>     at 
> rabbit.proxy.HttpHeaderFilterer$InFilterer.filter(HttpHeaderFilterer.java:54)
>     at rabbit.proxy.HttpHeaderFilterer.filter(HttpHeaderFilterer.java:44)
>     at 
> rabbit.proxy.HttpHeaderFilterer.filterHttpIn(HttpHeaderFilterer.java:80)
>     at 
> rabbit.proxy.Connection.filterAndHandleRequest(Connection.java:292)
>     at rabbit.proxy.Connection.access$400(Connection.java:47)
>     at rabbit.proxy.Connection$1.run(Connection.java:268)
>     at 
> org.khelekore.rnio.impl.StatisticsCollector.run(StatisticsCollector.java:37)
>     at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>     at java.lang.Thread.run(Thread.java:636)
>
> I tried to add debug output in the HttpHeaderParser lineRead method. 
> When we got the error, the first line of the HTTP is troncated:
>
> on= HTTP/1.1
>
> instead of
>
> GET 
> http://www.google.fr/m/search?q=test&pbx=1&aq=&oq=&aqi=&fkt=&fsdt=&cqt=&rst=&htf=&his=&maction= 
> HTTP/1.1
>
> I check with a wireshark network capture and the request is complete.
>
> I think the parser can't handle the first line because it is longer 
> than the first packet and the buffer read doesn't restart from begining?
>
> Could you confirm our analyze? How should we fix that?
> Thank you.
>
> Romain Godefroy





More information about the Rabbit-dev mailing list