google-code-export / firephp

Automatically exported from code.google.com/p/firephp
1 stars 0 forks source link

Long FirePHP log truncates response, and causes response error #162

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What versions and operating system are you using?

OS: Windows 7 64 bit
Firefox: 3.6.13
Firebug:
FirePHP Server Library: 0.3.2 (? not sure, however I have the most stable 
extension)
FirePHP Extension: 0.5.0

========================================================
What is the problem?
========================================================
Responses with very long FirePHP logs appear to cause the response to fail, as 
the complete response is not correctly appended to the response body.  

What steps will reproduce the problem?

========================================================
1. Call webservice that will produce a large FirePHP log:
========================================================
Below is the request header we used:
POST http://127.0.0.1/enteliweb/wsalarm/active/ HTTP/1.1
Host: 127.0.0.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) 
Gecko/20101203 Firefox/3.6.13 FirePHP/0.5
Accept: application/xml, text/xml, */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: 
http://127.0.0.1/enteliweb/dashboard/display/dashboard/fb6948ae-0df4-11e0-99e7-7
54a15897097
Content-Length: 37
Cookie: PHPSESSID=3jb2d8d8secf46k3viofaf9s27; frameWidth=250; 
ys-alarmTreeState=o%3AstateHash%3Do%253Aalarmtree_root%253Ds%25253A/alarmtree_ro
ot; ys-reportTree=o%3AstateHash%3Do%253Axnode-80%253Ds%25253A/xnode-80; 
ys-tree_fb8009b6-0a30-11e0-99f8-0d67df2a3485=o%3AstateHash%3Do%253Afb8009b6-0a30
-11e0-99f8-0d67df2a3485%253Ds%25253A/fb8009b6-0a30-11e0-99f8-0d67df2a3485; 
ys-homeTree=o%3AstateHash%3Do%253Ahometree_root%253Ds%25253A/hometree_root%255ED
ashboards%253Ds%25253A/hometree_root/Dashboards%255EEnterprise%253Ds%25253A/home
tree_root/Dashboards/Enterprise%255EPersonal%253Ds%25253A/hometree_root/Dashboar
ds/Personal
X-FireLogger: 0.9
x-insight: activate
Pragma: no-cache
Cache-Control: no-cache

Site=WebTeam&devices=&objects=&date=*

========================================================
2. Watch for the response in firebug or fiddler, the response will often 
indicate that it is 'chunked' and not contain the valid response.  Please see 
the attachment for the full response as it is very long.
========================================================
HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Transfer-Encoding: chunked
Content-Type: text/xml; charset=UTF-8
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Server: Microsoft-IIS/7.5
Set-Cookie: PHPSESSID=3jb2d8d8secf46k3viofaf9s27; path=/
RequestIndex: 
Set-Cookie: PHPSESSID=3jb2d8d8secf46k3viofaf9s27; path=/
Content-Langauge: en
X-Wf-Protocol-1: http://meta.wildfirehq.org/Protocol/JsonStream/0.2
X-Wf-1-Structure-1: http://meta.firephp.org/Wildfire/Structure/FirePHP
...

========================================================
3. If you disable FirePHP (or remove the FirePHP/0.5 directive from the request 
header and reissue the request) then the result will come back as expected:
========================================================
HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/xml; charset=UTF-8
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Server: Microsoft-IIS/7.5
Set-Cookie: PHPSESSID=3jb2d8d8secf46k3viofaf9s27; path=/
RequestIndex: 
Set-Cookie: PHPSESSID=3jb2d8d8secf46k3viofaf9s27; path=/
Content-Langauge: en
Date: Wed, 29 Dec 2010 20:12:15 GMT
Content-Length: 1156609

<?xml version="1.0" encoding="UTF-8"?>
<ActiveAlarmList site="WebTeam" totalAlarmCount="969" High="7" Medium="3" 
Low="956" filteredAlarmCount="969"><Alarm><Property name="EventId" 
value="//WebTeam/36900.EV1"/><Property name="Category" value="5"/><Property 
name="Priority" value="90"/><Property name="TimeStamp" 
value="2010-12-23T09:35:21.00-08:00"/><Property name="InUse" 
value="1"/><Property name="ToState" value="Alarm"/><Property name="InputRef" 
value="//WebTeam/36900.MI2.Value"/>... <MORE XML>

========================================================
What is the expected output? What do you see instead?
========================================================
I have added the output and results into the steps above.

========================================================
Please provide any additional information below.
========================================================
I noticed this when updated FireBug from 1.5.3 to 1.6.0, I could not reproduce 
this issue before then.

Please contact me if you would like more details,
Thank you!
-Shayla Sawchenko

Original issue reported on code.google.com by shayla.s...@gmail.com on 29 Dec 2010 at 8:18

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry, this was using FireBug 1.6.0.

Original comment by shayla.s...@gmail.com on 29 Dec 2010 at 8:19

GoogleCodeExporter commented 9 years ago
There were problems when logging lots of data prior to FirePHP 1.0.

Please try upgrading: http://upgrade.firephp.org/

Original comment by christ...@christophdorn.com on 3 Jan 2011 at 8:28

GoogleCodeExporter commented 9 years ago
An update: turns out that our server-side framework was not always explicitly 
setting Content-Length, which apparently means that IIS can choose to chunk the 
response or not.  

Not certain if there are issues in FireBug with chunking, but it would appear 
that this is not a FirePHP issue (simply FirePHP triggered the symptom).

Perhaps anyone else having this issue can check this on their setup as well.

Original comment by shayla.s...@gmail.com on 5 Jan 2011 at 11:29

GoogleCodeExporter commented 9 years ago
FirePHP should not be affected by the Content-Length HTTP response header or 
chunked encoding as all data (or a reference to it) is sent in the header prior 
to the content.

Original comment by christ...@christophdorn.com on 6 Jan 2011 at 12:54