You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@wookie.apache.org by Gonzalo Aguilar Delgado <ga...@aguilardelgado.com> on 2013/03/04 02:41:55 UTC
Chunked response against proxy
Hello,
I'm start to use wookie and it's a great product. However I found what
it seems to be a bug.
It seems that I cannot proxy anything that returns a "chunked" response.
Wookie got stalled.
Here is the tcp trace:
GET /lead-services-war/services/rest/lead/count.json HTTP/1.1
user-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0)
Gecko/20100101 Firefox/19.0
accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
accept-language: es,es-es;q=0.8,en;q=0.5,en-us;q=0.3
accept-encoding: gzip, deflate
cookie: JSESSIONID=33D24D7B4F4709B7F266EF3A57340674;
__utma=111872281.1736180143.1360930537.1360930537.1361652402.2;
__utmz=111872281.1360930537.1.1.utmcsr=(direct)|utmccn=(direct)|
utmcmd=(none);
WT_FPC=id=2bc1294b2ddc53454011361645134465:lv=1361646021835:ss=1361645134465
connection: keep-alive
Host: localhost:8080
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Date: Mon, 04 Mar 2013 01:31:55 GMT
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
36
{"status":"OK","data":{"@xsi.type":"xs:int","$":"21"}}
0
----------------------------------------------
As you can see response is there. But wookie does not responds. If I run
this from firefox it shows like waiting for response...
This is wookie in debug mode. May not be exactly the same request but
similar...
02:40:45,583 DEBUG ProxyClient:89 - GET from
http://localhost:8080/lead-services-war/services/rest//lead/count.json
02:40:45,583 DEBUG HttpConnection:692 - Open connection to
localhost:8080
02:40:45,583 DEBUG header:70 - >>
"GET /lead-services-war/services/rest//lead/count.json HTTP/1.1[\r][\n]"
02:40:45,584 DEBUG HttpMethodBase:1352 - Adding Host request header
02:40:45,584 DEBUG header:70 - >> "user-agent: Mozilla/5.0 (X11; Ubuntu;
Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0[\r][\n]"
02:40:45,584 DEBUG header:70 - >> "accept: text/html,application/xhtml
+xml,application/xml;q=0.9,*/*;q=0.8[\r][\n]"
02:40:45,584 DEBUG header:70 - >> "accept-language:
es,es-es;q=0.8,en;q=0.5,en-us;q=0.3[\r][\n]"
02:40:45,584 DEBUG header:70 - >> "accept-encoding: gzip,
deflate[\r][\n]"
02:40:45,584 DEBUG header:70 - >> "content-type:
application/x-www-form-urlencoded[\r][\n]"
02:40:45,584 DEBUG header:70 - >> "x-requested-with:
XMLHttpRequest[\r][\n]"
02:40:45,585 DEBUG header:70 - >> "referer:
http://localhost:8180/wookie/deploy/clt.level2crm.com/widgets/lead/index.html?idkey=JJY4mQNzUUrBjl.sl.fTAsUIdPs.pl.9A.eq.&proxy=http://localhost:8180/wookie/proxy&st=[\r][\n]"
02:40:45,585 DEBUG header:70 - >> "cookie:
JSESSIONID=33D24D7B4F4709B7F266EF3A57340674;
__utma=111872281.1736180143.1360930537.1360930537.1361652402.2;
__utmz=111872281.1360930537.1.1.utmcsr=(direct)|utmccn=(direct)|
utmcmd=(none);
WT_FPC=id=2bc1294b2ddc53454011361645134465:lv=1361646021835:ss=1361645134465[\r][\n]"
02:40:45,585 DEBUG header:70 - >> "connection: keep-alive[\r][\n]"
02:40:45,585 DEBUG header:70 - >> "Host: localhost:8080[\r][\n]"
02:40:45,585 DEBUG header:70 - >> "[\r][\n]"
02:40:45,593 DEBUG header:70 - << "HTTP/1.1 200 OK[\r][\n]"
02:40:45,593 DEBUG header:70 - << "HTTP/1.1 200 OK[\r][\n]"
02:40:45,594 DEBUG header:70 - << "Server: Apache-Coyote/1.1[\r][\n]"
02:40:45,594 DEBUG header:70 - << "Date: Mon, 04 Mar 2013 01:40:45
GMT[\r][\n]"
02:40:45,594 DEBUG header:70 - << "Content-Type:
application/json;charset=UTF-8[\r][\n]"
02:40:45,595 DEBUG header:70 - << "Transfer-Encoding: chunked[\r][\n]"
02:40:45,595 DEBUG header:70 - << "[\r][\n]"
02:40:45,596 DEBUG content:84 - << "3"
02:40:45,596 DEBUG content:84 - << "7"
02:40:45,597 DEBUG content:84 - << "[\r]"
02:40:45,597 DEBUG content:70 - << "[\n]"
02:40:45,597 DEBUG content:84 - <<
"{"status":"OK","data":{"@xsi.type":"ns3:int","$":"21"}}"
02:40:45,598 DEBUG content:84 - << "[\r]"
02:40:45,598 DEBUG content:70 - << "[\n]"
02:40:45,598 DEBUG content:84 - << "0"
02:40:45,599 DEBUG content:84 - << "[\r]"
02:40:45,599 DEBUG content:70 - << "[\n]"
02:40:45,600 DEBUG content:84 - << "[\r]"
02:40:45,600 DEBUG content:70 - << "[\n]"
02:40:45,600 DEBUG header:70 - << "[\r][\n]"
02:40:45,601 DEBUG HttpMethodBase:1014 - Should NOT close connection in
response to directive: keep-alive
02:40:45,601 DEBUG HttpConnection:1178 - Releasing connection back to
connection manager.
It seems that chunked response is not handled right.
Should I open a bug report?
Thank you.
Re: Chunked response against proxy
Posted by Gonzalo Aguilar Delgado <ga...@aguilardelgado.com>.
Thank you to you.
You all are doing a great job!
El mar, 05-03-2013 a las 09:12 +0000, Scott Wilson escribió:
> On 5 Mar 2013, at 09:02, Gonzalo Aguilar Delgado wrote:
>
>
> > Hello Scott,
> >
> > I've opened an issue. With the patch inside it's solved.
> >
> > https://issues.apache.org/jira/browse/WOOKIE-403#comment-13592550
> >
>
>
>
>
>
> Thanks! I've applied your patch and it will be part of the next
> release, hopefully later this month.
>
>
> >
> > El lun, 04-03-2013 a las 19:19 +0000, Scott Wilson escribió:
> >
> > > On 4 Mar 2013, at 18:36, Gonzalo Aguilar Delgado wrote:
> > >
> > >
> > > > Hello Scot,
> > > >
> > > > Yes. I think so. I've done a lot of tests and found that is
> > > > something related to wookie http handling.
> > > >
> > > > I can get result attaching directly to the URL so the problem is
> > > > in the proxy.
> > > >
> > > > I wanted to insulate the problem and tried to get the response
> > > > without client side libraries, just in case they are failing.
> > > >
> > > > [wget also fails]
> > > >
> > > > wget -c
> > > > "http://localhost:8180/wookie/proxy?instanceid_key=LltW4zAIxBNCZ4.pl.Baal5ROv4u54.eq.&url=http://localhost:8080/lead-services-war/services/rest//lead/count.json"
> > > > --2013-03-04 19:28:54--
> > > > http://localhost:8180/wookie/proxy?instanceid_key=LltW4zAIxBNCZ4.pl.Baal5ROv4u54.eq.&url=http://localhost:8080/lead-services-war/services/rest//lead/count.json
> > > > Resolviendo localhost (localhost)... ::1, 127.0.0.1
> > > > Conectando con localhost (localhost)[::1]:8180... conectado.
> > > > Petición HTTP enviada, esperando respuesta... 200 OK
> > > > Longitud: 55 [application/json]
> > > > Grabando a:
> > > > “proxy?instanceid_key=LltW4zAIxBNCZ4.pl.Baal5ROv4u54.eq.&url=http:%2F%2Flocalhost:8080%2Flead-services-war%2Fservices%2Frest%2F%2Flead%2Fcount.json”
> > > >
> > > > 0% [ ] 0 --.-K/s
> > > > en 0s
> > > >
> > > > 2013-03-04 19:29:14 (0,00 B/s) - Error de lectura en el byte
> > > > 0/55 (Conseguido). Reintentando.
> > > >
> > > >
> > > > This means "Error reading byte 0/55". It seems that clients are
> > > > honoring header lengths...
> > > >
> > > > [curl also fails] But it's more descriptive:
> > > >
> > > > curl
> > > > "http://localhost:8180/wookie/proxy?instanceid_key=LltW4zAIxBNCZ4.pl.Baal5ROv4u54.eq.&url=http://localhost:8080/lead-services-war/services/rest//lead/count.json"
> > > > curl: (56) Problem (2) in the Chunked-Encoded data
> > > >
> > > >
> > > > It seems that something is wrong with chunked data.
> > > >
> > > > I upgraded tomcat to 6.0.36 because seemed to be some errors in
> > > > previous versions. But no solution.
> > > >
> > > > I have to investigate they way proxy is working... If anyone can
> > > > think about one direction of investigation please let me know.
> > > >
> > >
> > >
> > >
> > > As you say the next task is to isolate the level at which the
> > > problem occurs. Its good to know its not a client-side problem.
> > > That leaves us with:
> > >
> > >
> > > 1. Tomcat
> > > 2. HttpClient
> > > 3. Wookie
> > >
> > >
> > > For Tomcat, have you also tried replicating the problem in Tomcat
> > > 7?
> > >
> > >
> > > At the Wookie level you can look at the Proxy code; the relevant
> > > class is ProxyClient; probably the executeMethod() method. You can
> > > try putting in some debugging output from there to see if that
> > > shows anything interesting.
> > >
> > >
> > > If its neither Tomcat or Wookie, then that leaves us with
> > > HttpClient.
> > >
> > >
> > > >
> > > > Thank you in advance.
> > > >
> > > >
> > > > El lun, 04-03-2013 a las 16:16 +0000, Scott Wilson escribió:
> > > >
> > > > >
> > > > > On 4 Mar 2013, at 16:09, Gonzalo Aguilar Delgado wrote:
> > > > >
> > > > >
> > > > > > Hello again,
> > > > > >
> > > > > > I've discovered that this only happnes when running wookie
> > > > > > under tomcat 6.
> > > > > >
> > > > > > It does work with jetty. So I think is something related to
> > > > > > infrastructure.
> > > > > >
> > > > > > Any points on this?
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > Hi Gonzalo,
> > > > >
> > > > >
> > > > > I can't think of anything that would specifically cause this
> > > > > issue. The proxy itself relies on what is now a fairly old
> > > > > version of Commons HttpClient, so the problem may lie there.
> > > > >
> > > > >
> > > > > S
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > >
> > > > > > El lun, 04-03-2013 a las 02:41 +0100, Gonzalo Aguilar
> > > > > > Delgado escribió:
> > > > > >
> > > > > > > Hello,
> > > > > > >
> > > > > > > I'm start to use wookie and it's a great product. However
> > > > > > > I found what it seems to be a bug.
> > > > > > >
> > > > > > > It seems that I cannot proxy anything that returns a
> > > > > > > "chunked" response. Wookie got stalled.
> > > > > > >
> > > > > > >
> > > > > > > Here is the tcp trace:
> > > > > > > GET /lead-services-war/services/rest/lead/count.json
> > > > > > > HTTP/1.1
> > > > > > > user-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64;
> > > > > > > rv:19.0) Gecko/20100101 Firefox/19.0
> > > > > > > accept: text/html,application/xhtml
> > > > > > > +xml,application/xml;q=0.9,*/*;q=0.8
> > > > > > > accept-language: es,es-es;q=0.8,en;q=0.5,en-us;q=0.3
> > > > > > > accept-encoding: gzip, deflate
> > > > > > > cookie: JSESSIONID=33D24D7B4F4709B7F266EF3A57340674;
> > > > > > > __utma=111872281.1736180143.1360930537.1360930537.1361652402.2; __utmz=111872281.1360930537.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); WT_FPC=id=2bc1294b2ddc53454011361645134465:lv=1361646021835:ss=1361645134465
> > > > > > > connection: keep-alive
> > > > > > > Host: localhost:8080
> > > > > > > ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
> > > > > > > HTTP/1.1 200 OK
> > > > > > > Server: Apache-Coyote/1.1
> > > > > > > Date: Mon, 04 Mar 2013 01:31:55 GMT
> > > > > > > Content-Type: application/json;charset=UTF-8
> > > > > > > Transfer-Encoding: chunked
> > > > > > >
> > > > > > > 36
> > > > > > > {"status":"OK","data":{"@xsi.type":"xs:int","$":"21"}}
> > > > > > > 0
> > > > > > >
> > > > > > > ----------------------------------------------
> > > > > > >
> > > > > > > As you can see response is there. But wookie does not
> > > > > > > responds. If I run this from firefox it shows like waiting
> > > > > > > for response...
> > > > > > >
> > > > > > >
> > > > > > > This is wookie in debug mode. May not be exactly the same
> > > > > > > request but similar...
> > > > > > >
> > > > > > >
> > > > > > > 02:40:45,583 DEBUG ProxyClient:89 - GET from
> > > > > > > http://localhost:8080/lead-services-war/services/rest//lead/count.json
> > > > > > > 02:40:45,583 DEBUG HttpConnection:692 - Open connection to
> > > > > > > localhost:8080
> > > > > > > 02:40:45,583 DEBUG header:70 - >>
> > > > > > > "GET /lead-services-war/services/rest//lead/count.json
> > > > > > > HTTP/1.1[\r][\n]"
> > > > > > > 02:40:45,584 DEBUG HttpMethodBase:1352 - Adding Host
> > > > > > > request header
> > > > > > > 02:40:45,584 DEBUG header:70 - >> "user-agent: Mozilla/5.0
> > > > > > > (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101
> > > > > > > Firefox/19.0[\r][\n]"
> > > > > > > 02:40:45,584 DEBUG header:70 - >> "accept:
> > > > > > > text/html,application/xhtml
> > > > > > > +xml,application/xml;q=0.9,*/*;q=0.8[\r][\n]"
> > > > > > > 02:40:45,584 DEBUG header:70 - >> "accept-language:
> > > > > > > es,es-es;q=0.8,en;q=0.5,en-us;q=0.3[\r][\n]"
> > > > > > > 02:40:45,584 DEBUG header:70 - >> "accept-encoding: gzip,
> > > > > > > deflate[\r][\n]"
> > > > > > > 02:40:45,584 DEBUG header:70 - >> "content-type:
> > > > > > > application/x-www-form-urlencoded[\r][\n]"
> > > > > > > 02:40:45,584 DEBUG header:70 - >> "x-requested-with:
> > > > > > > XMLHttpRequest[\r][\n]"
> > > > > > > 02:40:45,585 DEBUG header:70 - >> "referer:
> > > > > > > http://localhost:8180/wookie/deploy/clt.level2crm.com/widgets/lead/index.html?idkey=JJY4mQNzUUrBjl.sl.fTAsUIdPs.pl.9A.eq.&proxy=http://localhost:8180/wookie/proxy&st=[\r][\n]"
> > > > > > > 02:40:45,585 DEBUG header:70 - >> "cookie:
> > > > > > > JSESSIONID=33D24D7B4F4709B7F266EF3A57340674;
> > > > > > > __utma=111872281.1736180143.1360930537.1360930537.1361652402.2; __utmz=111872281.1360930537.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); WT_FPC=id=2bc1294b2ddc53454011361645134465:lv=1361646021835:ss=1361645134465[\r][\n]"
> > > > > > > 02:40:45,585 DEBUG header:70 - >> "connection:
> > > > > > > keep-alive[\r][\n]"
> > > > > > > 02:40:45,585 DEBUG header:70 - >> "Host:
> > > > > > > localhost:8080[\r][\n]"
> > > > > > > 02:40:45,585 DEBUG header:70 - >> "[\r][\n]"
> > > > > > > 02:40:45,593 DEBUG header:70 - << "HTTP/1.1 200
> > > > > > > OK[\r][\n]"
> > > > > > > 02:40:45,593 DEBUG header:70 - << "HTTP/1.1 200
> > > > > > > OK[\r][\n]"
> > > > > > > 02:40:45,594 DEBUG header:70 - << "Server:
> > > > > > > Apache-Coyote/1.1[\r][\n]"
> > > > > > > 02:40:45,594 DEBUG header:70 - << "Date: Mon, 04 Mar 2013
> > > > > > > 01:40:45 GMT[\r][\n]"
> > > > > > > 02:40:45,594 DEBUG header:70 - << "Content-Type:
> > > > > > > application/json;charset=UTF-8[\r][\n]"
> > > > > > > 02:40:45,595 DEBUG header:70 - << "Transfer-Encoding:
> > > > > > > chunked[\r][\n]"
> > > > > > > 02:40:45,595 DEBUG header:70 - << "[\r][\n]"
> > > > > > > 02:40:45,596 DEBUG content:84 - << "3"
> > > > > > > 02:40:45,596 DEBUG content:84 - << "7"
> > > > > > > 02:40:45,597 DEBUG content:84 - << "[\r]"
> > > > > > > 02:40:45,597 DEBUG content:70 - << "[\n]"
> > > > > > > 02:40:45,597 DEBUG content:84 - <<
> > > > > > > "{"status":"OK","data":{"@xsi.type":"ns3:int","$":"21"}}"
> > > > > > > 02:40:45,598 DEBUG content:84 - << "[\r]"
> > > > > > > 02:40:45,598 DEBUG content:70 - << "[\n]"
> > > > > > > 02:40:45,598 DEBUG content:84 - << "0"
> > > > > > > 02:40:45,599 DEBUG content:84 - << "[\r]"
> > > > > > > 02:40:45,599 DEBUG content:70 - << "[\n]"
> > > > > > > 02:40:45,600 DEBUG content:84 - << "[\r]"
> > > > > > > 02:40:45,600 DEBUG content:70 - << "[\n]"
> > > > > > > 02:40:45,600 DEBUG header:70 - << "[\r][\n]"
> > > > > > > 02:40:45,601 DEBUG HttpMethodBase:1014 - Should NOT close
> > > > > > > connection in response to directive: keep-alive
> > > > > > > 02:40:45,601 DEBUG HttpConnection:1178 - Releasing
> > > > > > > connection back to connection manager.
> > > > > > >
> > > > > > >
> > > > > > > It seems that chunked response is not handled right.
> > > > > > >
> > > > > > > Should I open a bug report?
> > > > > > >
> > > > > > > Thank you.
> > > > >
> > > > >
> > > > >
> > >
> > >
>
>
Re: Chunked response against proxy
Posted by Scott Wilson <sc...@gmail.com>.
On 5 Mar 2013, at 09:02, Gonzalo Aguilar Delgado wrote:
> Hello Scott,
>
> I've opened an issue. With the patch inside it's solved.
>
> https://issues.apache.org/jira/browse/WOOKIE-403#comment-13592550
Thanks! I've applied your patch and it will be part of the next release, hopefully later this month.
>
> El lun, 04-03-2013 a las 19:19 +0000, Scott Wilson escribió:
>>
>> On 4 Mar 2013, at 18:36, Gonzalo Aguilar Delgado wrote:
>>
>>> Hello Scot,
>>>
>>> Yes. I think so. I've done a lot of tests and found that is something related to wookie http handling.
>>>
>>> I can get result attaching directly to the URL so the problem is in the proxy.
>>>
>>> I wanted to insulate the problem and tried to get the response without client side libraries, just in case they are failing.
>>>
>>> [wget also fails]
>>>
>>> wget -c "http://localhost:8180/wookie/proxy?instanceid_key=LltW4zAIxBNCZ4.pl.Baal5ROv4u54.eq.&url=http://localhost:8080/lead-services-war/services/rest//lead/count.json"
>>> --2013-03-04 19:28:54-- http://localhost:8180/wookie/proxy?instanceid_key=LltW4zAIxBNCZ4.pl.Baal5ROv4u54.eq.&url=http://localhost:8080/lead-services-war/services/rest//lead/count.json
>>> Resolviendo localhost (localhost)... ::1, 127.0.0.1
>>> Conectando con localhost (localhost)[::1]:8180... conectado.
>>> Petición HTTP enviada, esperando respuesta... 200 OK
>>> Longitud: 55 [application/json]
>>> Grabando a: “proxy?instanceid_key=LltW4zAIxBNCZ4.pl.Baal5ROv4u54.eq.&url=http:%2F%2Flocalhost:8080%2Flead-services-war%2Fservices%2Frest%2F%2Flead%2Fcount.json”
>>>
>>> 0% [ ] 0 --.-K/s en 0s
>>>
>>> 2013-03-04 19:29:14 (0,00 B/s) - Error de lectura en el byte 0/55 (Conseguido). Reintentando.
>>>
>>>
>>> This means "Error reading byte 0/55". It seems that clients are honoring header lengths...
>>>
>>> [curl also fails] But it's more descriptive:
>>>
>>> curl "http://localhost:8180/wookie/proxy?instanceid_key=LltW4zAIxBNCZ4.pl.Baal5ROv4u54.eq.&url=http://localhost:8080/lead-services-war/services/rest//lead/count.json"
>>> curl: (56) Problem (2) in the Chunked-Encoded data
>>>
>>>
>>> It seems that something is wrong with chunked data.
>>>
>>> I upgraded tomcat to 6.0.36 because seemed to be some errors in previous versions. But no solution.
>>>
>>> I have to investigate they way proxy is working... If anyone can think about one direction of investigation please let me know.
>>>
>>
>>
>> As you say the next task is to isolate the level at which the problem occurs. Its good to know its not a client-side problem. That leaves us with:
>>
>>
>> 1. Tomcat
>> 2. HttpClient
>> 3. Wookie
>>
>>
>> For Tomcat, have you also tried replicating the problem in Tomcat 7?
>>
>>
>> At the Wookie level you can look at the Proxy code; the relevant class is ProxyClient; probably the executeMethod() method. You can try putting in some debugging output from there to see if that shows anything interesting.
>>
>>
>> If its neither Tomcat or Wookie, then that leaves us with HttpClient.
>>
>>>
>>> Thank you in advance.
>>>
>>>
>>> El lun, 04-03-2013 a las 16:16 +0000, Scott Wilson escribió:
>>>>
>>>> On 4 Mar 2013, at 16:09, Gonzalo Aguilar Delgado wrote:
>>>>
>>>>> Hello again,
>>>>>
>>>>> I've discovered that this only happnes when running wookie under tomcat 6.
>>>>>
>>>>> It does work with jetty. So I think is something related to infrastructure.
>>>>>
>>>>> Any points on this?
>>>>>
>>>>
>>>>
>>>> Hi Gonzalo,
>>>>
>>>>
>>>> I can't think of anything that would specifically cause this issue. The proxy itself relies on what is now a fairly old version of Commons HttpClient, so the problem may lie there.
>>>>
>>>>
>>>> S
>>>>
>>>>
>>>>
>>>>
>>>>>
>>>>> El lun, 04-03-2013 a las 02:41 +0100, Gonzalo Aguilar Delgado escribió:
>>>>>> Hello,
>>>>>>
>>>>>> I'm start to use wookie and it's a great product. However I found what it seems to be a bug.
>>>>>>
>>>>>> It seems that I cannot proxy anything that returns a "chunked" response. Wookie got stalled.
>>>>>>
>>>>>>
>>>>>> Here is the tcp trace:
>>>>>> GET /lead-services-war/services/rest/lead/count.json HTTP/1.1
>>>>>> user-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0
>>>>>> accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
>>>>>> accept-language: es,es-es;q=0.8,en;q=0.5,en-us;q=0.3
>>>>>> accept-encoding: gzip, deflate
>>>>>> cookie: JSESSIONID=33D24D7B4F4709B7F266EF3A57340674; __utma=111872281.1736180143.1360930537.1360930537.1361652402.2; __utmz=111872281.1360930537.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); WT_FPC=id=2bc1294b2ddc53454011361645134465:lv=1361646021835:ss=1361645134465
>>>>>> connection: keep-alive
>>>>>> Host: localhost:8080
>>>>>> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>>>>> HTTP/1.1 200 OK
>>>>>> Server: Apache-Coyote/1.1
>>>>>> Date: Mon, 04 Mar 2013 01:31:55 GMT
>>>>>> Content-Type: application/json;charset=UTF-8
>>>>>> Transfer-Encoding: chunked
>>>>>>
>>>>>> 36
>>>>>> {"status":"OK","data":{"@xsi.type":"xs:int","$":"21"}}
>>>>>> 0
>>>>>>
>>>>>> ----------------------------------------------
>>>>>>
>>>>>> As you can see response is there. But wookie does not responds. If I run this from firefox it shows like waiting for response...
>>>>>>
>>>>>>
>>>>>> This is wookie in debug mode. May not be exactly the same request but similar...
>>>>>>
>>>>>>
>>>>>> 02:40:45,583 DEBUG ProxyClient:89 - GET from http://localhost:8080/lead-services-war/services/rest//lead/count.json
>>>>>> 02:40:45,583 DEBUG HttpConnection:692 - Open connection to localhost:8080
>>>>>> 02:40:45,583 DEBUG header:70 - >> "GET /lead-services-war/services/rest//lead/count.json HTTP/1.1[\r][\n]"
>>>>>> 02:40:45,584 DEBUG HttpMethodBase:1352 - Adding Host request header
>>>>>> 02:40:45,584 DEBUG header:70 - >> "user-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0[\r][\n]"
>>>>>> 02:40:45,584 DEBUG header:70 - >> "accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8[\r][\n]"
>>>>>> 02:40:45,584 DEBUG header:70 - >> "accept-language: es,es-es;q=0.8,en;q=0.5,en-us;q=0.3[\r][\n]"
>>>>>> 02:40:45,584 DEBUG header:70 - >> "accept-encoding: gzip, deflate[\r][\n]"
>>>>>> 02:40:45,584 DEBUG header:70 - >> "content-type: application/x-www-form-urlencoded[\r][\n]"
>>>>>> 02:40:45,584 DEBUG header:70 - >> "x-requested-with: XMLHttpRequest[\r][\n]"
>>>>>> 02:40:45,585 DEBUG header:70 - >> "referer: http://localhost:8180/wookie/deploy/clt.level2crm.com/widgets/lead/index.html?idkey=JJY4mQNzUUrBjl.sl.fTAsUIdPs.pl.9A.eq.&proxy=http://localhost:8180/wookie/proxy&st=[\r][\n]"
>>>>>> 02:40:45,585 DEBUG header:70 - >> "cookie: JSESSIONID=33D24D7B4F4709B7F266EF3A57340674; __utma=111872281.1736180143.1360930537.1360930537.1361652402.2; __utmz=111872281.1360930537.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); WT_FPC=id=2bc1294b2ddc53454011361645134465:lv=1361646021835:ss=1361645134465[\r][\n]"
>>>>>> 02:40:45,585 DEBUG header:70 - >> "connection: keep-alive[\r][\n]"
>>>>>> 02:40:45,585 DEBUG header:70 - >> "Host: localhost:8080[\r][\n]"
>>>>>> 02:40:45,585 DEBUG header:70 - >> "[\r][\n]"
>>>>>> 02:40:45,593 DEBUG header:70 - << "HTTP/1.1 200 OK[\r][\n]"
>>>>>> 02:40:45,593 DEBUG header:70 - << "HTTP/1.1 200 OK[\r][\n]"
>>>>>> 02:40:45,594 DEBUG header:70 - << "Server: Apache-Coyote/1.1[\r][\n]"
>>>>>> 02:40:45,594 DEBUG header:70 - << "Date: Mon, 04 Mar 2013 01:40:45 GMT[\r][\n]"
>>>>>> 02:40:45,594 DEBUG header:70 - << "Content-Type: application/json;charset=UTF-8[\r][\n]"
>>>>>> 02:40:45,595 DEBUG header:70 - << "Transfer-Encoding: chunked[\r][\n]"
>>>>>> 02:40:45,595 DEBUG header:70 - << "[\r][\n]"
>>>>>> 02:40:45,596 DEBUG content:84 - << "3"
>>>>>> 02:40:45,596 DEBUG content:84 - << "7"
>>>>>> 02:40:45,597 DEBUG content:84 - << "[\r]"
>>>>>> 02:40:45,597 DEBUG content:70 - << "[\n]"
>>>>>> 02:40:45,597 DEBUG content:84 - << "{"status":"OK","data":{"@xsi.type":"ns3:int","$":"21"}}"
>>>>>> 02:40:45,598 DEBUG content:84 - << "[\r]"
>>>>>> 02:40:45,598 DEBUG content:70 - << "[\n]"
>>>>>> 02:40:45,598 DEBUG content:84 - << "0"
>>>>>> 02:40:45,599 DEBUG content:84 - << "[\r]"
>>>>>> 02:40:45,599 DEBUG content:70 - << "[\n]"
>>>>>> 02:40:45,600 DEBUG content:84 - << "[\r]"
>>>>>> 02:40:45,600 DEBUG content:70 - << "[\n]"
>>>>>> 02:40:45,600 DEBUG header:70 - << "[\r][\n]"
>>>>>> 02:40:45,601 DEBUG HttpMethodBase:1014 - Should NOT close connection in response to directive: keep-alive
>>>>>> 02:40:45,601 DEBUG HttpConnection:1178 - Releasing connection back to connection manager.
>>>>>>
>>>>>>
>>>>>> It seems that chunked response is not handled right.
>>>>>>
>>>>>> Should I open a bug report?
>>>>>>
>>>>>> Thank you.
>>>>
>>>>
>>
Re: Chunked response against proxy
Posted by Gonzalo Aguilar Delgado <ga...@aguilardelgado.com>.
Hello Scott,
I've opened an issue. With the patch inside it's solved.
https://issues.apache.org/jira/browse/WOOKIE-403#comment-13592550
El lun, 04-03-2013 a las 19:19 +0000, Scott Wilson escribió:
> On 4 Mar 2013, at 18:36, Gonzalo Aguilar Delgado wrote:
>
>
>
> > Hello Scot,
> >
> > Yes. I think so. I've done a lot of tests and found that is
> > something related to wookie http handling.
> >
> > I can get result attaching directly to the URL so the problem is in
> > the proxy.
> >
> > I wanted to insulate the problem and tried to get the response
> > without client side libraries, just in case they are failing.
> >
> > [wget also fails]
> >
> > wget -c
> > "http://localhost:8180/wookie/proxy?instanceid_key=LltW4zAIxBNCZ4.pl.Baal5ROv4u54.eq.&url=http://localhost:8080/lead-services-war/services/rest//lead/count.json"
> > --2013-03-04 19:28:54--
> > http://localhost:8180/wookie/proxy?instanceid_key=LltW4zAIxBNCZ4.pl.Baal5ROv4u54.eq.&url=http://localhost:8080/lead-services-war/services/rest//lead/count.json
> > Resolviendo localhost (localhost)... ::1, 127.0.0.1
> > Conectando con localhost (localhost)[::1]:8180... conectado.
> > Petición HTTP enviada, esperando respuesta... 200 OK
> > Longitud: 55 [application/json]
> > Grabando a:
> > “proxy?instanceid_key=LltW4zAIxBNCZ4.pl.Baal5ROv4u54.eq.&url=http:%
> > 2F%2Flocalhost:8080%2Flead-services-war%2Fservices%2Frest%2F%2Flead%
> > 2Fcount.json”
> >
> > 0% [ ] 0 --.-K/s
> > en 0s
> >
> > 2013-03-04 19:29:14 (0,00 B/s) - Error de lectura en el byte 0/55
> > (Conseguido). Reintentando.
> >
> >
> > This means "Error reading byte 0/55". It seems that clients are
> > honoring header lengths...
> >
> > [curl also fails] But it's more descriptive:
> >
> > curl
> > "http://localhost:8180/wookie/proxy?instanceid_key=LltW4zAIxBNCZ4.pl.Baal5ROv4u54.eq.&url=http://localhost:8080/lead-services-war/services/rest//lead/count.json"
> > curl: (56) Problem (2) in the Chunked-Encoded data
> >
> >
> > It seems that something is wrong with chunked data.
> >
> > I upgraded tomcat to 6.0.36 because seemed to be some errors in
> > previous versions. But no solution.
> >
> > I have to investigate they way proxy is working... If anyone can
> > think about one direction of investigation please let me know.
> >
>
>
> As you say the next task is to isolate the level at which the problem
> occurs. Its good to know its not a client-side problem. That leaves us
> with:
>
>
> 1. Tomcat
> 2. HttpClient
> 3. Wookie
>
>
> For Tomcat, have you also tried replicating the problem in Tomcat 7?
>
>
> At the Wookie level you can look at the Proxy code; the relevant class
> is ProxyClient; probably the executeMethod() method. You can try
> putting in some debugging output from there to see if that shows
> anything interesting.
>
>
>
> If its neither Tomcat or Wookie, then that leaves us with HttpClient.
>
>
> >
> > Thank you in advance.
> >
> >
> > El lun, 04-03-2013 a las 16:16 +0000, Scott Wilson escribió:
> >
> > >
> > > On 4 Mar 2013, at 16:09, Gonzalo Aguilar Delgado wrote:
> > >
> > >
> > > > Hello again,
> > > >
> > > > I've discovered that this only happnes when running wookie under
> > > > tomcat 6.
> > > >
> > > > It does work with jetty. So I think is something related to
> > > > infrastructure.
> > > >
> > > > Any points on this?
> > > >
> > >
> > >
> > >
> > > Hi Gonzalo,
> > >
> > >
> > > I can't think of anything that would specifically cause this
> > > issue. The proxy itself relies on what is now a fairly old version
> > > of Commons HttpClient, so the problem may lie there.
> > >
> > >
> > > S
> > >
> > >
> > >
> > >
> > >
> > > >
> > > > El lun, 04-03-2013 a las 02:41 +0100, Gonzalo Aguilar Delgado
> > > > escribió:
> > > >
> > > > > Hello,
> > > > >
> > > > > I'm start to use wookie and it's a great product. However I
> > > > > found what it seems to be a bug.
> > > > >
> > > > > It seems that I cannot proxy anything that returns a "chunked"
> > > > > response. Wookie got stalled.
> > > > >
> > > > >
> > > > > Here is the tcp trace:
> > > > > GET /lead-services-war/services/rest/lead/count.json HTTP/1.1
> > > > > user-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0)
> > > > > Gecko/20100101 Firefox/19.0
> > > > > accept: text/html,application/xhtml
> > > > > +xml,application/xml;q=0.9,*/*;q=0.8
> > > > > accept-language: es,es-es;q=0.8,en;q=0.5,en-us;q=0.3
> > > > > accept-encoding: gzip, deflate
> > > > > cookie: JSESSIONID=33D24D7B4F4709B7F266EF3A57340674;
> > > > > __utma=111872281.1736180143.1360930537.1360930537.1361652402.2; __utmz=111872281.1360930537.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); WT_FPC=id=2bc1294b2ddc53454011361645134465:lv=1361646021835:ss=1361645134465
> > > > > connection: keep-alive
> > > > > Host: localhost:8080
> > > > > ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
> > > > > HTTP/1.1 200 OK
> > > > > Server: Apache-Coyote/1.1
> > > > > Date: Mon, 04 Mar 2013 01:31:55 GMT
> > > > > Content-Type: application/json;charset=UTF-8
> > > > > Transfer-Encoding: chunked
> > > > >
> > > > > 36
> > > > > {"status":"OK","data":{"@xsi.type":"xs:int","$":"21"}}
> > > > > 0
> > > > >
> > > > > ----------------------------------------------
> > > > >
> > > > > As you can see response is there. But wookie does not
> > > > > responds. If I run this from firefox it shows like waiting for
> > > > > response...
> > > > >
> > > > >
> > > > > This is wookie in debug mode. May not be exactly the same
> > > > > request but similar...
> > > > >
> > > > >
> > > > > 02:40:45,583 DEBUG ProxyClient:89 - GET from
> > > > > http://localhost:8080/lead-services-war/services/rest//lead/count.json
> > > > > 02:40:45,583 DEBUG HttpConnection:692 - Open connection to
> > > > > localhost:8080
> > > > > 02:40:45,583 DEBUG header:70 - >>
> > > > > "GET /lead-services-war/services/rest//lead/count.json
> > > > > HTTP/1.1[\r][\n]"
> > > > > 02:40:45,584 DEBUG HttpMethodBase:1352 - Adding Host request
> > > > > header
> > > > > 02:40:45,584 DEBUG header:70 - >> "user-agent: Mozilla/5.0
> > > > > (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101
> > > > > Firefox/19.0[\r][\n]"
> > > > > 02:40:45,584 DEBUG header:70 - >> "accept:
> > > > > text/html,application/xhtml
> > > > > +xml,application/xml;q=0.9,*/*;q=0.8[\r][\n]"
> > > > > 02:40:45,584 DEBUG header:70 - >> "accept-language:
> > > > > es,es-es;q=0.8,en;q=0.5,en-us;q=0.3[\r][\n]"
> > > > > 02:40:45,584 DEBUG header:70 - >> "accept-encoding: gzip,
> > > > > deflate[\r][\n]"
> > > > > 02:40:45,584 DEBUG header:70 - >> "content-type:
> > > > > application/x-www-form-urlencoded[\r][\n]"
> > > > > 02:40:45,584 DEBUG header:70 - >> "x-requested-with:
> > > > > XMLHttpRequest[\r][\n]"
> > > > > 02:40:45,585 DEBUG header:70 - >> "referer:
> > > > > http://localhost:8180/wookie/deploy/clt.level2crm.com/widgets/lead/index.html?idkey=JJY4mQNzUUrBjl.sl.fTAsUIdPs.pl.9A.eq.&proxy=http://localhost:8180/wookie/proxy&st=[\r][\n]"
> > > > > 02:40:45,585 DEBUG header:70 - >> "cookie:
> > > > > JSESSIONID=33D24D7B4F4709B7F266EF3A57340674;
> > > > > __utma=111872281.1736180143.1360930537.1360930537.1361652402.2; __utmz=111872281.1360930537.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); WT_FPC=id=2bc1294b2ddc53454011361645134465:lv=1361646021835:ss=1361645134465[\r][\n]"
> > > > > 02:40:45,585 DEBUG header:70 - >> "connection:
> > > > > keep-alive[\r][\n]"
> > > > > 02:40:45,585 DEBUG header:70 - >> "Host:
> > > > > localhost:8080[\r][\n]"
> > > > > 02:40:45,585 DEBUG header:70 - >> "[\r][\n]"
> > > > > 02:40:45,593 DEBUG header:70 - << "HTTP/1.1 200 OK[\r][\n]"
> > > > > 02:40:45,593 DEBUG header:70 - << "HTTP/1.1 200 OK[\r][\n]"
> > > > > 02:40:45,594 DEBUG header:70 - << "Server:
> > > > > Apache-Coyote/1.1[\r][\n]"
> > > > > 02:40:45,594 DEBUG header:70 - << "Date: Mon, 04 Mar 2013
> > > > > 01:40:45 GMT[\r][\n]"
> > > > > 02:40:45,594 DEBUG header:70 - << "Content-Type:
> > > > > application/json;charset=UTF-8[\r][\n]"
> > > > > 02:40:45,595 DEBUG header:70 - << "Transfer-Encoding:
> > > > > chunked[\r][\n]"
> > > > > 02:40:45,595 DEBUG header:70 - << "[\r][\n]"
> > > > > 02:40:45,596 DEBUG content:84 - << "3"
> > > > > 02:40:45,596 DEBUG content:84 - << "7"
> > > > > 02:40:45,597 DEBUG content:84 - << "[\r]"
> > > > > 02:40:45,597 DEBUG content:70 - << "[\n]"
> > > > > 02:40:45,597 DEBUG content:84 - <<
> > > > > "{"status":"OK","data":{"@xsi.type":"ns3:int","$":"21"}}"
> > > > > 02:40:45,598 DEBUG content:84 - << "[\r]"
> > > > > 02:40:45,598 DEBUG content:70 - << "[\n]"
> > > > > 02:40:45,598 DEBUG content:84 - << "0"
> > > > > 02:40:45,599 DEBUG content:84 - << "[\r]"
> > > > > 02:40:45,599 DEBUG content:70 - << "[\n]"
> > > > > 02:40:45,600 DEBUG content:84 - << "[\r]"
> > > > > 02:40:45,600 DEBUG content:70 - << "[\n]"
> > > > > 02:40:45,600 DEBUG header:70 - << "[\r][\n]"
> > > > > 02:40:45,601 DEBUG HttpMethodBase:1014 - Should NOT close
> > > > > connection in response to directive: keep-alive
> > > > > 02:40:45,601 DEBUG HttpConnection:1178 - Releasing connection
> > > > > back to connection manager.
> > > > >
> > > > >
> > > > > It seems that chunked response is not handled right.
> > > > >
> > > > > Should I open a bug report?
> > > > >
> > > > > Thank you.
> > >
> > >
> > >
>
>
Re: Chunked response against proxy
Posted by Scott Wilson <sc...@gmail.com>.
On 4 Mar 2013, at 18:36, Gonzalo Aguilar Delgado wrote:
> Hello Scot,
>
> Yes. I think so. I've done a lot of tests and found that is something related to wookie http handling.
>
> I can get result attaching directly to the URL so the problem is in the proxy.
>
> I wanted to insulate the problem and tried to get the response without client side libraries, just in case they are failing.
>
> [wget also fails]
>
> wget -c "http://localhost:8180/wookie/proxy?instanceid_key=LltW4zAIxBNCZ4.pl.Baal5ROv4u54.eq.&url=http://localhost:8080/lead-services-war/services/rest//lead/count.json"
> --2013-03-04 19:28:54-- http://localhost:8180/wookie/proxy?instanceid_key=LltW4zAIxBNCZ4.pl.Baal5ROv4u54.eq.&url=http://localhost:8080/lead-services-war/services/rest//lead/count.json
> Resolviendo localhost (localhost)... ::1, 127.0.0.1
> Conectando con localhost (localhost)[::1]:8180... conectado.
> Petición HTTP enviada, esperando respuesta... 200 OK
> Longitud: 55 [application/json]
> Grabando a: “proxy?instanceid_key=LltW4zAIxBNCZ4.pl.Baal5ROv4u54.eq.&url=http:%2F%2Flocalhost:8080%2Flead-services-war%2Fservices%2Frest%2F%2Flead%2Fcount.json”
>
> 0% [ ] 0 --.-K/s en 0s
>
> 2013-03-04 19:29:14 (0,00 B/s) - Error de lectura en el byte 0/55 (Conseguido). Reintentando.
>
>
> This means "Error reading byte 0/55". It seems that clients are honoring header lengths...
>
> [curl also fails] But it's more descriptive:
>
> curl "http://localhost:8180/wookie/proxy?instanceid_key=LltW4zAIxBNCZ4.pl.Baal5ROv4u54.eq.&url=http://localhost:8080/lead-services-war/services/rest//lead/count.json"
> curl: (56) Problem (2) in the Chunked-Encoded data
>
>
> It seems that something is wrong with chunked data.
>
> I upgraded tomcat to 6.0.36 because seemed to be some errors in previous versions. But no solution.
>
> I have to investigate they way proxy is working... If anyone can think about one direction of investigation please let me know.
As you say the next task is to isolate the level at which the problem occurs. Its good to know its not a client-side problem. That leaves us with:
1. Tomcat
2. HttpClient
3. Wookie
For Tomcat, have you also tried replicating the problem in Tomcat 7?
At the Wookie level you can look at the Proxy code; the relevant class is ProxyClient; probably the executeMethod() method. You can try putting in some debugging output from there to see if that shows anything interesting.
If its neither Tomcat or Wookie, then that leaves us with HttpClient.
>
> Thank you in advance.
>
>
> El lun, 04-03-2013 a las 16:16 +0000, Scott Wilson escribió:
>>
>>
>> On 4 Mar 2013, at 16:09, Gonzalo Aguilar Delgado wrote:
>>
>>> Hello again,
>>>
>>> I've discovered that this only happnes when running wookie under tomcat 6.
>>>
>>> It does work with jetty. So I think is something related to infrastructure.
>>>
>>> Any points on this?
>>>
>>
>>
>> Hi Gonzalo,
>>
>>
>> I can't think of anything that would specifically cause this issue. The proxy itself relies on what is now a fairly old version of Commons HttpClient, so the problem may lie there.
>>
>>
>> S
>>
>>
>>
>>
>>>
>>> El lun, 04-03-2013 a las 02:41 +0100, Gonzalo Aguilar Delgado escribió:
>>>> Hello,
>>>>
>>>> I'm start to use wookie and it's a great product. However I found what it seems to be a bug.
>>>>
>>>> It seems that I cannot proxy anything that returns a "chunked" response. Wookie got stalled.
>>>>
>>>>
>>>> Here is the tcp trace:
>>>> GET /lead-services-war/services/rest/lead/count.json HTTP/1.1
>>>> user-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0
>>>> accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
>>>> accept-language: es,es-es;q=0.8,en;q=0.5,en-us;q=0.3
>>>> accept-encoding: gzip, deflate
>>>> cookie: JSESSIONID=33D24D7B4F4709B7F266EF3A57340674; __utma=111872281.1736180143.1360930537.1360930537.1361652402.2; __utmz=111872281.1360930537.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); WT_FPC=id=2bc1294b2ddc53454011361645134465:lv=1361646021835:ss=1361645134465
>>>> connection: keep-alive
>>>> Host: localhost:8080
>>>> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>>> HTTP/1.1 200 OK
>>>> Server: Apache-Coyote/1.1
>>>> Date: Mon, 04 Mar 2013 01:31:55 GMT
>>>> Content-Type: application/json;charset=UTF-8
>>>> Transfer-Encoding: chunked
>>>>
>>>> 36
>>>> {"status":"OK","data":{"@xsi.type":"xs:int","$":"21"}}
>>>> 0
>>>>
>>>> ----------------------------------------------
>>>>
>>>> As you can see response is there. But wookie does not responds. If I run this from firefox it shows like waiting for response...
>>>>
>>>>
>>>> This is wookie in debug mode. May not be exactly the same request but similar...
>>>>
>>>>
>>>> 02:40:45,583 DEBUG ProxyClient:89 - GET from http://localhost:8080/lead-services-war/services/rest//lead/count.json
>>>> 02:40:45,583 DEBUG HttpConnection:692 - Open connection to localhost:8080
>>>> 02:40:45,583 DEBUG header:70 - >> "GET /lead-services-war/services/rest//lead/count.json HTTP/1.1[\r][\n]"
>>>> 02:40:45,584 DEBUG HttpMethodBase:1352 - Adding Host request header
>>>> 02:40:45,584 DEBUG header:70 - >> "user-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0[\r][\n]"
>>>> 02:40:45,584 DEBUG header:70 - >> "accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8[\r][\n]"
>>>> 02:40:45,584 DEBUG header:70 - >> "accept-language: es,es-es;q=0.8,en;q=0.5,en-us;q=0.3[\r][\n]"
>>>> 02:40:45,584 DEBUG header:70 - >> "accept-encoding: gzip, deflate[\r][\n]"
>>>> 02:40:45,584 DEBUG header:70 - >> "content-type: application/x-www-form-urlencoded[\r][\n]"
>>>> 02:40:45,584 DEBUG header:70 - >> "x-requested-with: XMLHttpRequest[\r][\n]"
>>>> 02:40:45,585 DEBUG header:70 - >> "referer: http://localhost:8180/wookie/deploy/clt.level2crm.com/widgets/lead/index.html?idkey=JJY4mQNzUUrBjl.sl.fTAsUIdPs.pl.9A.eq.&proxy=http://localhost:8180/wookie/proxy&st=[\r][\n]"
>>>> 02:40:45,585 DEBUG header:70 - >> "cookie: JSESSIONID=33D24D7B4F4709B7F266EF3A57340674; __utma=111872281.1736180143.1360930537.1360930537.1361652402.2; __utmz=111872281.1360930537.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); WT_FPC=id=2bc1294b2ddc53454011361645134465:lv=1361646021835:ss=1361645134465[\r][\n]"
>>>> 02:40:45,585 DEBUG header:70 - >> "connection: keep-alive[\r][\n]"
>>>> 02:40:45,585 DEBUG header:70 - >> "Host: localhost:8080[\r][\n]"
>>>> 02:40:45,585 DEBUG header:70 - >> "[\r][\n]"
>>>> 02:40:45,593 DEBUG header:70 - << "HTTP/1.1 200 OK[\r][\n]"
>>>> 02:40:45,593 DEBUG header:70 - << "HTTP/1.1 200 OK[\r][\n]"
>>>> 02:40:45,594 DEBUG header:70 - << "Server: Apache-Coyote/1.1[\r][\n]"
>>>> 02:40:45,594 DEBUG header:70 - << "Date: Mon, 04 Mar 2013 01:40:45 GMT[\r][\n]"
>>>> 02:40:45,594 DEBUG header:70 - << "Content-Type: application/json;charset=UTF-8[\r][\n]"
>>>> 02:40:45,595 DEBUG header:70 - << "Transfer-Encoding: chunked[\r][\n]"
>>>> 02:40:45,595 DEBUG header:70 - << "[\r][\n]"
>>>> 02:40:45,596 DEBUG content:84 - << "3"
>>>> 02:40:45,596 DEBUG content:84 - << "7"
>>>> 02:40:45,597 DEBUG content:84 - << "[\r]"
>>>> 02:40:45,597 DEBUG content:70 - << "[\n]"
>>>> 02:40:45,597 DEBUG content:84 - << "{"status":"OK","data":{"@xsi.type":"ns3:int","$":"21"}}"
>>>> 02:40:45,598 DEBUG content:84 - << "[\r]"
>>>> 02:40:45,598 DEBUG content:70 - << "[\n]"
>>>> 02:40:45,598 DEBUG content:84 - << "0"
>>>> 02:40:45,599 DEBUG content:84 - << "[\r]"
>>>> 02:40:45,599 DEBUG content:70 - << "[\n]"
>>>> 02:40:45,600 DEBUG content:84 - << "[\r]"
>>>> 02:40:45,600 DEBUG content:70 - << "[\n]"
>>>> 02:40:45,600 DEBUG header:70 - << "[\r][\n]"
>>>> 02:40:45,601 DEBUG HttpMethodBase:1014 - Should NOT close connection in response to directive: keep-alive
>>>> 02:40:45,601 DEBUG HttpConnection:1178 - Releasing connection back to connection manager.
>>>>
>>>>
>>>> It seems that chunked response is not handled right.
>>>>
>>>> Should I open a bug report?
>>>>
>>>> Thank you.
>>
>>
Re: Chunked response against proxy
Posted by Gonzalo Aguilar Delgado <ga...@aguilardelgado.com>.
Hello Scot,
Yes. I think so. I've done a lot of tests and found that is something
related to wookie http handling.
I can get result attaching directly to the URL so the problem is in the
proxy.
I wanted to insulate the problem and tried to get the response without
client side libraries, just in case they are failing.
[wget also fails]
wget -c
"http://localhost:8180/wookie/proxy?instanceid_key=LltW4zAIxBNCZ4.pl.Baal5ROv4u54.eq.&url=http://localhost:8080/lead-services-war/services/rest//lead/count.json"
--2013-03-04 19:28:54--
http://localhost:8180/wookie/proxy?instanceid_key=LltW4zAIxBNCZ4.pl.Baal5ROv4u54.eq.&url=http://localhost:8080/lead-services-war/services/rest//lead/count.json
Resolviendo localhost (localhost)... ::1, 127.0.0.1
Conectando con localhost (localhost)[::1]:8180... conectado.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 55 [application/json]
Grabando a:
“proxy?instanceid_key=LltW4zAIxBNCZ4.pl.Baal5ROv4u54.eq.&url=http:%2F%
2Flocalhost:8080%2Flead-services-war%2Fservices%2Frest%2F%2Flead%
2Fcount.json”
0% [ ] 0 --.-K/s en
0s
2013-03-04 19:29:14 (0,00 B/s) - Error de lectura en el byte 0/55
(Conseguido). Reintentando.
This means "Error reading byte 0/55". It seems that clients are honoring
header lengths...
[curl also fails] But it's more descriptive:
curl
"http://localhost:8180/wookie/proxy?instanceid_key=LltW4zAIxBNCZ4.pl.Baal5ROv4u54.eq.&url=http://localhost:8080/lead-services-war/services/rest//lead/count.json"
curl: (56) Problem (2) in the Chunked-Encoded data
It seems that something is wrong with chunked data.
I upgraded tomcat to 6.0.36 because seemed to be some errors in previous
versions. But no solution.
I have to investigate they way proxy is working... If anyone can think
about one direction of investigation please let me know.
Thank you in advance.
El lun, 04-03-2013 a las 16:16 +0000, Scott Wilson escribió:
>
>
> On 4 Mar 2013, at 16:09, Gonzalo Aguilar Delgado wrote:
>
>
>
> > Hello again,
> >
> > I've discovered that this only happnes when running wookie under
> > tomcat 6.
> >
> > It does work with jetty. So I think is something related to
> > infrastructure.
> >
> > Any points on this?
> >
>
>
>
> Hi Gonzalo,
>
>
>
> I can't think of anything that would specifically cause this issue.
> The proxy itself relies on what is now a fairly old version of Commons
> HttpClient, so the problem may lie there.
>
>
> S
>
>
>
>
> >
> > El lun, 04-03-2013 a las 02:41 +0100, Gonzalo Aguilar Delgado
> > escribió:
> >
> > > Hello,
> > >
> > > I'm start to use wookie and it's a great product. However I found
> > > what it seems to be a bug.
> > >
> > > It seems that I cannot proxy anything that returns a "chunked"
> > > response. Wookie got stalled.
> > >
> > >
> > > Here is the tcp trace:
> > > GET /lead-services-war/services/rest/lead/count.json HTTP/1.1
> > > user-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0)
> > > Gecko/20100101 Firefox/19.0
> > > accept: text/html,application/xhtml
> > > +xml,application/xml;q=0.9,*/*;q=0.8
> > > accept-language: es,es-es;q=0.8,en;q=0.5,en-us;q=0.3
> > > accept-encoding: gzip, deflate
> > > cookie: JSESSIONID=33D24D7B4F4709B7F266EF3A57340674;
> > > __utma=111872281.1736180143.1360930537.1360930537.1361652402.2;
> > > __utmz=111872281.1360930537.1.1.utmcsr=(direct)|utmccn=(direct)|
> > > utmcmd=(none);
> > > WT_FPC=id=2bc1294b2ddc53454011361645134465:lv=1361646021835:ss=1361645134465
> > > connection: keep-alive
> > > Host: localhost:8080
> > > ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
> > > HTTP/1.1 200 OK
> > > Server: Apache-Coyote/1.1
> > > Date: Mon, 04 Mar 2013 01:31:55 GMT
> > > Content-Type: application/json;charset=UTF-8
> > > Transfer-Encoding: chunked
> > >
> > > 36
> > > {"status":"OK","data":{"@xsi.type":"xs:int","$":"21"}}
> > > 0
> > >
> > > ----------------------------------------------
> > >
> > > As you can see response is there. But wookie does not responds. If
> > > I run this from firefox it shows like waiting for response...
> > >
> > >
> > > This is wookie in debug mode. May not be exactly the same request
> > > but similar...
> > >
> > >
> > > 02:40:45,583 DEBUG ProxyClient:89 - GET from
> > > http://localhost:8080/lead-services-war/services/rest//lead/count.json
> > > 02:40:45,583 DEBUG HttpConnection:692 - Open connection to
> > > localhost:8080
> > > 02:40:45,583 DEBUG header:70 - >>
> > > "GET /lead-services-war/services/rest//lead/count.json
> > > HTTP/1.1[\r][\n]"
> > > 02:40:45,584 DEBUG HttpMethodBase:1352 - Adding Host request
> > > header
> > > 02:40:45,584 DEBUG header:70 - >> "user-agent: Mozilla/5.0 (X11;
> > > Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101
> > > Firefox/19.0[\r][\n]"
> > > 02:40:45,584 DEBUG header:70 - >> "accept:
> > > text/html,application/xhtml
> > > +xml,application/xml;q=0.9,*/*;q=0.8[\r][\n]"
> > > 02:40:45,584 DEBUG header:70 - >> "accept-language:
> > > es,es-es;q=0.8,en;q=0.5,en-us;q=0.3[\r][\n]"
> > > 02:40:45,584 DEBUG header:70 - >> "accept-encoding: gzip,
> > > deflate[\r][\n]"
> > > 02:40:45,584 DEBUG header:70 - >> "content-type:
> > > application/x-www-form-urlencoded[\r][\n]"
> > > 02:40:45,584 DEBUG header:70 - >> "x-requested-with:
> > > XMLHttpRequest[\r][\n]"
> > > 02:40:45,585 DEBUG header:70 - >> "referer:
> > > http://localhost:8180/wookie/deploy/clt.level2crm.com/widgets/lead/index.html?idkey=JJY4mQNzUUrBjl.sl.fTAsUIdPs.pl.9A.eq.&proxy=http://localhost:8180/wookie/proxy&st=[\r][\n]"
> > > 02:40:45,585 DEBUG header:70 - >> "cookie:
> > > JSESSIONID=33D24D7B4F4709B7F266EF3A57340674;
> > > __utma=111872281.1736180143.1360930537.1360930537.1361652402.2;
> > > __utmz=111872281.1360930537.1.1.utmcsr=(direct)|utmccn=(direct)|
> > > utmcmd=(none);
> > > WT_FPC=id=2bc1294b2ddc53454011361645134465:lv=1361646021835:ss=1361645134465[\r][\n]"
> > > 02:40:45,585 DEBUG header:70 - >> "connection: keep-alive[\r][\n]"
> > > 02:40:45,585 DEBUG header:70 - >> "Host: localhost:8080[\r][\n]"
> > > 02:40:45,585 DEBUG header:70 - >> "[\r][\n]"
> > > 02:40:45,593 DEBUG header:70 - << "HTTP/1.1 200 OK[\r][\n]"
> > > 02:40:45,593 DEBUG header:70 - << "HTTP/1.1 200 OK[\r][\n]"
> > > 02:40:45,594 DEBUG header:70 - << "Server:
> > > Apache-Coyote/1.1[\r][\n]"
> > > 02:40:45,594 DEBUG header:70 - << "Date: Mon, 04 Mar 2013 01:40:45
> > > GMT[\r][\n]"
> > > 02:40:45,594 DEBUG header:70 - << "Content-Type:
> > > application/json;charset=UTF-8[\r][\n]"
> > > 02:40:45,595 DEBUG header:70 - << "Transfer-Encoding:
> > > chunked[\r][\n]"
> > > 02:40:45,595 DEBUG header:70 - << "[\r][\n]"
> > > 02:40:45,596 DEBUG content:84 - << "3"
> > > 02:40:45,596 DEBUG content:84 - << "7"
> > > 02:40:45,597 DEBUG content:84 - << "[\r]"
> > > 02:40:45,597 DEBUG content:70 - << "[\n]"
> > > 02:40:45,597 DEBUG content:84 - <<
> > > "{"status":"OK","data":{"@xsi.type":"ns3:int","$":"21"}}"
> > > 02:40:45,598 DEBUG content:84 - << "[\r]"
> > > 02:40:45,598 DEBUG content:70 - << "[\n]"
> > > 02:40:45,598 DEBUG content:84 - << "0"
> > > 02:40:45,599 DEBUG content:84 - << "[\r]"
> > > 02:40:45,599 DEBUG content:70 - << "[\n]"
> > > 02:40:45,600 DEBUG content:84 - << "[\r]"
> > > 02:40:45,600 DEBUG content:70 - << "[\n]"
> > > 02:40:45,600 DEBUG header:70 - << "[\r][\n]"
> > > 02:40:45,601 DEBUG HttpMethodBase:1014 - Should NOT close
> > > connection in response to directive: keep-alive
> > > 02:40:45,601 DEBUG HttpConnection:1178 - Releasing connection back
> > > to connection manager.
> > >
> > >
> > > It seems that chunked response is not handled right.
> > >
> > > Should I open a bug report?
> > >
> > > Thank you.
>
>
>
Re: Chunked response against proxy
Posted by Gonzalo Aguilar Delgado <ga...@aguilardelgado.com>.
Hello,
I've found the problem.
Is this code inside the ProxyServlet.java
//
// Set Headers
//
for (Header header:responseObject.headers){
if(!header.getName().startsWith("Transfer-Encoding"))
response.setHeader(header.getName(), header.getValue());
}
I think it's setting the Transfer-Encoding header for chunked data while
it should not.
The returned data is not chunked anymore since it got parsed by
httpClient. So the header should not
be transferred to the result.
What do you think?
If I remove all headers it works. Now I have to see what's the offending
header :-)
El lun, 04-03-2013 a las 16:16 +0000, Scott Wilson escribió:
>
>
> On 4 Mar 2013, at 16:09, Gonzalo Aguilar Delgado wrote:
>
>
>
> > Hello again,
> >
> > I've discovered that this only happnes when running wookie under
> > tomcat 6.
> >
> > It does work with jetty. So I think is something related to
> > infrastructure.
> >
> > Any points on this?
> >
>
>
>
> Hi Gonzalo,
>
>
>
> I can't think of anything that would specifically cause this issue.
> The proxy itself relies on what is now a fairly old version of Commons
> HttpClient, so the problem may lie there.
>
>
> S
>
>
>
>
> >
> > El lun, 04-03-2013 a las 02:41 +0100, Gonzalo Aguilar Delgado
> > escribió:
> >
> > > Hello,
> > >
> > > I'm start to use wookie and it's a great product. However I found
> > > what it seems to be a bug.
> > >
> > > It seems that I cannot proxy anything that returns a "chunked"
> > > response. Wookie got stalled.
> > >
> > >
> > > Here is the tcp trace:
> > > GET /lead-services-war/services/rest/lead/count.json HTTP/1.1
> > > user-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0)
> > > Gecko/20100101 Firefox/19.0
> > > accept: text/html,application/xhtml
> > > +xml,application/xml;q=0.9,*/*;q=0.8
> > > accept-language: es,es-es;q=0.8,en;q=0.5,en-us;q=0.3
> > > accept-encoding: gzip, deflate
> > > cookie: JSESSIONID=33D24D7B4F4709B7F266EF3A57340674;
> > > __utma=111872281.1736180143.1360930537.1360930537.1361652402.2;
> > > __utmz=111872281.1360930537.1.1.utmcsr=(direct)|utmccn=(direct)|
> > > utmcmd=(none);
> > > WT_FPC=id=2bc1294b2ddc53454011361645134465:lv=1361646021835:ss=1361645134465
> > > connection: keep-alive
> > > Host: localhost:8080
> > > ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
> > > HTTP/1.1 200 OK
> > > Server: Apache-Coyote/1.1
> > > Date: Mon, 04 Mar 2013 01:31:55 GMT
> > > Content-Type: application/json;charset=UTF-8
> > > Transfer-Encoding: chunked
> > >
> > > 36
> > > {"status":"OK","data":{"@xsi.type":"xs:int","$":"21"}}
> > > 0
> > >
> > > ----------------------------------------------
> > >
> > > As you can see response is there. But wookie does not responds. If
> > > I run this from firefox it shows like waiting for response...
> > >
> > >
> > > This is wookie in debug mode. May not be exactly the same request
> > > but similar...
> > >
> > >
> > > 02:40:45,583 DEBUG ProxyClient:89 - GET from
> > > http://localhost:8080/lead-services-war/services/rest//lead/count.json
> > > 02:40:45,583 DEBUG HttpConnection:692 - Open connection to
> > > localhost:8080
> > > 02:40:45,583 DEBUG header:70 - >>
> > > "GET /lead-services-war/services/rest//lead/count.json
> > > HTTP/1.1[\r][\n]"
> > > 02:40:45,584 DEBUG HttpMethodBase:1352 - Adding Host request
> > > header
> > > 02:40:45,584 DEBUG header:70 - >> "user-agent: Mozilla/5.0 (X11;
> > > Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101
> > > Firefox/19.0[\r][\n]"
> > > 02:40:45,584 DEBUG header:70 - >> "accept:
> > > text/html,application/xhtml
> > > +xml,application/xml;q=0.9,*/*;q=0.8[\r][\n]"
> > > 02:40:45,584 DEBUG header:70 - >> "accept-language:
> > > es,es-es;q=0.8,en;q=0.5,en-us;q=0.3[\r][\n]"
> > > 02:40:45,584 DEBUG header:70 - >> "accept-encoding: gzip,
> > > deflate[\r][\n]"
> > > 02:40:45,584 DEBUG header:70 - >> "content-type:
> > > application/x-www-form-urlencoded[\r][\n]"
> > > 02:40:45,584 DEBUG header:70 - >> "x-requested-with:
> > > XMLHttpRequest[\r][\n]"
> > > 02:40:45,585 DEBUG header:70 - >> "referer:
> > > http://localhost:8180/wookie/deploy/clt.level2crm.com/widgets/lead/index.html?idkey=JJY4mQNzUUrBjl.sl.fTAsUIdPs.pl.9A.eq.&proxy=http://localhost:8180/wookie/proxy&st=[\r][\n]"
> > > 02:40:45,585 DEBUG header:70 - >> "cookie:
> > > JSESSIONID=33D24D7B4F4709B7F266EF3A57340674;
> > > __utma=111872281.1736180143.1360930537.1360930537.1361652402.2;
> > > __utmz=111872281.1360930537.1.1.utmcsr=(direct)|utmccn=(direct)|
> > > utmcmd=(none);
> > > WT_FPC=id=2bc1294b2ddc53454011361645134465:lv=1361646021835:ss=1361645134465[\r][\n]"
> > > 02:40:45,585 DEBUG header:70 - >> "connection: keep-alive[\r][\n]"
> > > 02:40:45,585 DEBUG header:70 - >> "Host: localhost:8080[\r][\n]"
> > > 02:40:45,585 DEBUG header:70 - >> "[\r][\n]"
> > > 02:40:45,593 DEBUG header:70 - << "HTTP/1.1 200 OK[\r][\n]"
> > > 02:40:45,593 DEBUG header:70 - << "HTTP/1.1 200 OK[\r][\n]"
> > > 02:40:45,594 DEBUG header:70 - << "Server:
> > > Apache-Coyote/1.1[\r][\n]"
> > > 02:40:45,594 DEBUG header:70 - << "Date: Mon, 04 Mar 2013 01:40:45
> > > GMT[\r][\n]"
> > > 02:40:45,594 DEBUG header:70 - << "Content-Type:
> > > application/json;charset=UTF-8[\r][\n]"
> > > 02:40:45,595 DEBUG header:70 - << "Transfer-Encoding:
> > > chunked[\r][\n]"
> > > 02:40:45,595 DEBUG header:70 - << "[\r][\n]"
> > > 02:40:45,596 DEBUG content:84 - << "3"
> > > 02:40:45,596 DEBUG content:84 - << "7"
> > > 02:40:45,597 DEBUG content:84 - << "[\r]"
> > > 02:40:45,597 DEBUG content:70 - << "[\n]"
> > > 02:40:45,597 DEBUG content:84 - <<
> > > "{"status":"OK","data":{"@xsi.type":"ns3:int","$":"21"}}"
> > > 02:40:45,598 DEBUG content:84 - << "[\r]"
> > > 02:40:45,598 DEBUG content:70 - << "[\n]"
> > > 02:40:45,598 DEBUG content:84 - << "0"
> > > 02:40:45,599 DEBUG content:84 - << "[\r]"
> > > 02:40:45,599 DEBUG content:70 - << "[\n]"
> > > 02:40:45,600 DEBUG content:84 - << "[\r]"
> > > 02:40:45,600 DEBUG content:70 - << "[\n]"
> > > 02:40:45,600 DEBUG header:70 - << "[\r][\n]"
> > > 02:40:45,601 DEBUG HttpMethodBase:1014 - Should NOT close
> > > connection in response to directive: keep-alive
> > > 02:40:45,601 DEBUG HttpConnection:1178 - Releasing connection back
> > > to connection manager.
> > >
> > >
> > > It seems that chunked response is not handled right.
> > >
> > > Should I open a bug report?
> > >
> > > Thank you.
>
>
>
Re: Chunked response against proxy
Posted by Scott Wilson <sc...@gmail.com>.
On 4 Mar 2013, at 16:09, Gonzalo Aguilar Delgado wrote:
> Hello again,
>
> I've discovered that this only happnes when running wookie under tomcat 6.
>
> It does work with jetty. So I think is something related to infrastructure.
>
> Any points on this?
Hi Gonzalo,
I can't think of anything that would specifically cause this issue. The proxy itself relies on what is now a fairly old version of Commons HttpClient, so the problem may lie there.
S
>
> El lun, 04-03-2013 a las 02:41 +0100, Gonzalo Aguilar Delgado escribió:
>> Hello,
>>
>> I'm start to use wookie and it's a great product. However I found what it seems to be a bug.
>>
>> It seems that I cannot proxy anything that returns a "chunked" response. Wookie got stalled.
>>
>>
>> Here is the tcp trace:
>> GET /lead-services-war/services/rest/lead/count.json HTTP/1.1
>> user-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0
>> accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
>> accept-language: es,es-es;q=0.8,en;q=0.5,en-us;q=0.3
>> accept-encoding: gzip, deflate
>> cookie: JSESSIONID=33D24D7B4F4709B7F266EF3A57340674; __utma=111872281.1736180143.1360930537.1360930537.1361652402.2; __utmz=111872281.1360930537.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); WT_FPC=id=2bc1294b2ddc53454011361645134465:lv=1361646021835:ss=1361645134465
>> connection: keep-alive
>> Host: localhost:8080
>> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
>> HTTP/1.1 200 OK
>> Server: Apache-Coyote/1.1
>> Date: Mon, 04 Mar 2013 01:31:55 GMT
>> Content-Type: application/json;charset=UTF-8
>> Transfer-Encoding: chunked
>>
>> 36
>> {"status":"OK","data":{"@xsi.type":"xs:int","$":"21"}}
>> 0
>>
>> ----------------------------------------------
>>
>> As you can see response is there. But wookie does not responds. If I run this from firefox it shows like waiting for response...
>>
>>
>> This is wookie in debug mode. May not be exactly the same request but similar...
>>
>>
>> 02:40:45,583 DEBUG ProxyClient:89 - GET from http://localhost:8080/lead-services-war/services/rest//lead/count.json
>> 02:40:45,583 DEBUG HttpConnection:692 - Open connection to localhost:8080
>> 02:40:45,583 DEBUG header:70 - >> "GET /lead-services-war/services/rest//lead/count.json HTTP/1.1[\r][\n]"
>> 02:40:45,584 DEBUG HttpMethodBase:1352 - Adding Host request header
>> 02:40:45,584 DEBUG header:70 - >> "user-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0[\r][\n]"
>> 02:40:45,584 DEBUG header:70 - >> "accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8[\r][\n]"
>> 02:40:45,584 DEBUG header:70 - >> "accept-language: es,es-es;q=0.8,en;q=0.5,en-us;q=0.3[\r][\n]"
>> 02:40:45,584 DEBUG header:70 - >> "accept-encoding: gzip, deflate[\r][\n]"
>> 02:40:45,584 DEBUG header:70 - >> "content-type: application/x-www-form-urlencoded[\r][\n]"
>> 02:40:45,584 DEBUG header:70 - >> "x-requested-with: XMLHttpRequest[\r][\n]"
>> 02:40:45,585 DEBUG header:70 - >> "referer: http://localhost:8180/wookie/deploy/clt.level2crm.com/widgets/lead/index.html?idkey=JJY4mQNzUUrBjl.sl.fTAsUIdPs.pl.9A.eq.&proxy=http://localhost:8180/wookie/proxy&st=[\r][\n]"
>> 02:40:45,585 DEBUG header:70 - >> "cookie: JSESSIONID=33D24D7B4F4709B7F266EF3A57340674; __utma=111872281.1736180143.1360930537.1360930537.1361652402.2; __utmz=111872281.1360930537.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); WT_FPC=id=2bc1294b2ddc53454011361645134465:lv=1361646021835:ss=1361645134465[\r][\n]"
>> 02:40:45,585 DEBUG header:70 - >> "connection: keep-alive[\r][\n]"
>> 02:40:45,585 DEBUG header:70 - >> "Host: localhost:8080[\r][\n]"
>> 02:40:45,585 DEBUG header:70 - >> "[\r][\n]"
>> 02:40:45,593 DEBUG header:70 - << "HTTP/1.1 200 OK[\r][\n]"
>> 02:40:45,593 DEBUG header:70 - << "HTTP/1.1 200 OK[\r][\n]"
>> 02:40:45,594 DEBUG header:70 - << "Server: Apache-Coyote/1.1[\r][\n]"
>> 02:40:45,594 DEBUG header:70 - << "Date: Mon, 04 Mar 2013 01:40:45 GMT[\r][\n]"
>> 02:40:45,594 DEBUG header:70 - << "Content-Type: application/json;charset=UTF-8[\r][\n]"
>> 02:40:45,595 DEBUG header:70 - << "Transfer-Encoding: chunked[\r][\n]"
>> 02:40:45,595 DEBUG header:70 - << "[\r][\n]"
>> 02:40:45,596 DEBUG content:84 - << "3"
>> 02:40:45,596 DEBUG content:84 - << "7"
>> 02:40:45,597 DEBUG content:84 - << "[\r]"
>> 02:40:45,597 DEBUG content:70 - << "[\n]"
>> 02:40:45,597 DEBUG content:84 - << "{"status":"OK","data":{"@xsi.type":"ns3:int","$":"21"}}"
>> 02:40:45,598 DEBUG content:84 - << "[\r]"
>> 02:40:45,598 DEBUG content:70 - << "[\n]"
>> 02:40:45,598 DEBUG content:84 - << "0"
>> 02:40:45,599 DEBUG content:84 - << "[\r]"
>> 02:40:45,599 DEBUG content:70 - << "[\n]"
>> 02:40:45,600 DEBUG content:84 - << "[\r]"
>> 02:40:45,600 DEBUG content:70 - << "[\n]"
>> 02:40:45,600 DEBUG header:70 - << "[\r][\n]"
>> 02:40:45,601 DEBUG HttpMethodBase:1014 - Should NOT close connection in response to directive: keep-alive
>> 02:40:45,601 DEBUG HttpConnection:1178 - Releasing connection back to connection manager.
>>
>>
>> It seems that chunked response is not handled right.
>>
>> Should I open a bug report?
>>
>> Thank you.
Re: Chunked response against proxy
Posted by Gonzalo Aguilar Delgado <ga...@aguilardelgado.com>.
Hello again,
I've discovered that this only happnes when running wookie under tomcat
6.
It does work with jetty. So I think is something related to
infrastructure.
Any points on this?
El lun, 04-03-2013 a las 02:41 +0100, Gonzalo Aguilar Delgado escribió:
> Hello,
>
> I'm start to use wookie and it's a great product. However I found what
> it seems to be a bug.
>
> It seems that I cannot proxy anything that returns a "chunked"
> response. Wookie got stalled.
>
>
> Here is the tcp trace:
> GET /lead-services-war/services/rest/lead/count.json HTTP/1.1
> user-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0)
> Gecko/20100101 Firefox/19.0
> accept: text/html,application/xhtml
> +xml,application/xml;q=0.9,*/*;q=0.8
> accept-language: es,es-es;q=0.8,en;q=0.5,en-us;q=0.3
> accept-encoding: gzip, deflate
> cookie: JSESSIONID=33D24D7B4F4709B7F266EF3A57340674;
> __utma=111872281.1736180143.1360930537.1360930537.1361652402.2;
> __utmz=111872281.1360930537.1.1.utmcsr=(direct)|utmccn=(direct)|
> utmcmd=(none);
> WT_FPC=id=2bc1294b2ddc53454011361645134465:lv=1361646021835:ss=1361645134465
> connection: keep-alive
> Host: localhost:8080
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
> HTTP/1.1 200 OK
> Server: Apache-Coyote/1.1
> Date: Mon, 04 Mar 2013 01:31:55 GMT
> Content-Type: application/json;charset=UTF-8
> Transfer-Encoding: chunked
>
> 36
> {"status":"OK","data":{"@xsi.type":"xs:int","$":"21"}}
> 0
>
> ----------------------------------------------
>
> As you can see response is there. But wookie does not responds. If I
> run this from firefox it shows like waiting for response...
>
>
> This is wookie in debug mode. May not be exactly the same request but
> similar...
>
>
> 02:40:45,583 DEBUG ProxyClient:89 - GET from
> http://localhost:8080/lead-services-war/services/rest//lead/count.json
> 02:40:45,583 DEBUG HttpConnection:692 - Open connection to
> localhost:8080
> 02:40:45,583 DEBUG header:70 - >>
> "GET /lead-services-war/services/rest//lead/count.json
> HTTP/1.1[\r][\n]"
> 02:40:45,584 DEBUG HttpMethodBase:1352 - Adding Host request header
> 02:40:45,584 DEBUG header:70 - >> "user-agent: Mozilla/5.0 (X11;
> Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0[\r][\n]"
> 02:40:45,584 DEBUG header:70 - >> "accept: text/html,application/xhtml
> +xml,application/xml;q=0.9,*/*;q=0.8[\r][\n]"
> 02:40:45,584 DEBUG header:70 - >> "accept-language:
> es,es-es;q=0.8,en;q=0.5,en-us;q=0.3[\r][\n]"
> 02:40:45,584 DEBUG header:70 - >> "accept-encoding: gzip,
> deflate[\r][\n]"
> 02:40:45,584 DEBUG header:70 - >> "content-type:
> application/x-www-form-urlencoded[\r][\n]"
> 02:40:45,584 DEBUG header:70 - >> "x-requested-with:
> XMLHttpRequest[\r][\n]"
> 02:40:45,585 DEBUG header:70 - >> "referer:
> http://localhost:8180/wookie/deploy/clt.level2crm.com/widgets/lead/index.html?idkey=JJY4mQNzUUrBjl.sl.fTAsUIdPs.pl.9A.eq.&proxy=http://localhost:8180/wookie/proxy&st=[\r][\n]"
> 02:40:45,585 DEBUG header:70 - >> "cookie:
> JSESSIONID=33D24D7B4F4709B7F266EF3A57340674;
> __utma=111872281.1736180143.1360930537.1360930537.1361652402.2;
> __utmz=111872281.1360930537.1.1.utmcsr=(direct)|utmccn=(direct)|
> utmcmd=(none);
> WT_FPC=id=2bc1294b2ddc53454011361645134465:lv=1361646021835:ss=1361645134465[\r][\n]"
> 02:40:45,585 DEBUG header:70 - >> "connection: keep-alive[\r][\n]"
> 02:40:45,585 DEBUG header:70 - >> "Host: localhost:8080[\r][\n]"
> 02:40:45,585 DEBUG header:70 - >> "[\r][\n]"
> 02:40:45,593 DEBUG header:70 - << "HTTP/1.1 200 OK[\r][\n]"
> 02:40:45,593 DEBUG header:70 - << "HTTP/1.1 200 OK[\r][\n]"
> 02:40:45,594 DEBUG header:70 - << "Server: Apache-Coyote/1.1[\r][\n]"
> 02:40:45,594 DEBUG header:70 - << "Date: Mon, 04 Mar 2013 01:40:45
> GMT[\r][\n]"
> 02:40:45,594 DEBUG header:70 - << "Content-Type:
> application/json;charset=UTF-8[\r][\n]"
> 02:40:45,595 DEBUG header:70 - << "Transfer-Encoding: chunked[\r][\n]"
> 02:40:45,595 DEBUG header:70 - << "[\r][\n]"
> 02:40:45,596 DEBUG content:84 - << "3"
> 02:40:45,596 DEBUG content:84 - << "7"
> 02:40:45,597 DEBUG content:84 - << "[\r]"
> 02:40:45,597 DEBUG content:70 - << "[\n]"
> 02:40:45,597 DEBUG content:84 - <<
> "{"status":"OK","data":{"@xsi.type":"ns3:int","$":"21"}}"
> 02:40:45,598 DEBUG content:84 - << "[\r]"
> 02:40:45,598 DEBUG content:70 - << "[\n]"
> 02:40:45,598 DEBUG content:84 - << "0"
> 02:40:45,599 DEBUG content:84 - << "[\r]"
> 02:40:45,599 DEBUG content:70 - << "[\n]"
> 02:40:45,600 DEBUG content:84 - << "[\r]"
> 02:40:45,600 DEBUG content:70 - << "[\n]"
> 02:40:45,600 DEBUG header:70 - << "[\r][\n]"
> 02:40:45,601 DEBUG HttpMethodBase:1014 - Should NOT close connection
> in response to directive: keep-alive
> 02:40:45,601 DEBUG HttpConnection:1178 - Releasing connection back to
> connection manager.
>
>
> It seems that chunked response is not handled right.
>
> Should I open a bug report?
>
> Thank you.