How to see the Request body for pending requests

1,855 views
Skip to first unread message

Kumar Harsh Srivastava

unread,
Jul 16, 2014, 2:58:51 AM7/16/14
to fir...@googlegroups.com
In firebug's Net panel, if I click on a request row, it shows the request headers, body and response, etc.
But if the request is still pending, (say server is stuck somewhere, or some error in my code), firebug shows NOTHING. When I hover over the URL row, it just shows the full URL, but it's not clickable, so I cannot view the request sent at all. The request is shown only when the request times-out, which understandable takes a looooong time to come... (or I have to manually crash my server so that firebug shows what requests were sent, which is pretty stupid)

In the Chrome Deveopler Tools, or even in Firefox's Developer Tools, when I select a pending request, the "provisional" data is shown. This is of great help, as it permits me to immediately start searching for possible bugs in my code, rather than waiting for a timeout.

Jan Honza Odvarko

unread,
Jul 16, 2014, 7:47:06 AM7/16/14
to fir...@googlegroups.com
This might be possible to fix.

Do you have an online test case that we could use to test it?
Can you file a bug (or is there one already?) and attach the test case?
https://code.google.com/p/fbug/issues/list

Thanks
Honza

Kumar Harsh Srivastava

unread,
Jul 16, 2014, 8:12:01 AM7/16/14
to fir...@googlegroups.com
I'm not sure how I'll post a test-case for this. We'll basically need to make an AJAX request which takes a long time to complete (or gets stuck on the serverside), so that no response comes for enough time that we can open firebug and test this occurence.

Jan Honza Odvarko

unread,
Jul 16, 2014, 8:35:36 AM7/16/14
to fir...@googlegroups.com
There is one existing and related issue report here:
https://code.google.com/p/fbug/issues/detail?id=5684


> I'm not sure how I'll post a test-case for this.
A simple PHP and HTML page would be great.

Honza

Sebastian Zartner

unread,
Jul 16, 2014, 8:35:59 AM7/16/14
to fir...@googlegroups.com
This is already reported in issue 5684. It would be great if you could attach a test case for both, long loading and aborted requests to it.

Sebastian

Kumar Harsh Srivastava

unread,
Jul 16, 2014, 8:44:58 AM7/16/14
to fir...@googlegroups.com
@Jan I was talking about the "hosting" end of the test-case.
@Sebastian I knew the issue existed somewhere, but google was proving very uncooperative in my searches for one... So I posted in the forum, so that someone can point out the correct bug instead of filing duplicates. :)

I'll hopefully put test cases up tonight...

Jan Honza Odvarko

unread,
Jul 16, 2014, 8:50:04 AM7/16/14
to fir...@googlegroups.com
On Wednesday, July 16, 2014 2:44:58 PM UTC+2, Kumar Harsh Srivastava wrote:
@Jan I was talking about the "hosting" end of the test-case.
We can host the php file on getfirebug.com (as we do for many other test cases)

Honza

Kumar Harsh Srivastava

unread,
Jul 16, 2014, 9:24:17 AM7/16/14
to fir...@googlegroups.com
OK. Try these files. (Lifted from w3schools' example for Ajax with PHP Servers)

If your server is fast, maybe you'll not get enough time before response comes, in that case, just increase the number of items in the array, or remove the echo at the end.
gethint.php
index.html

Jan Honza Odvarko

unread,
Jul 18, 2014, 3:58:24 AM7/18/14
to fir...@googlegroups.com
On Wednesday, July 16, 2014 3:24:17 PM UTC+2, Kumar Harsh Srivastava wrote:
OK. Try these files. (Lifted from w3schools' example for Ajax with PHP Servers)

If your server is fast, maybe you'll not get enough time before response comes, in that case, just increase the number of items in the array, or remove the echo at the end.


I tried the test case and I think that the problem is that you are sending the result at the end of the process, if you *flush* the response buffer during the computation (using flush() PHP API), Firebug properly shows the response as it's coming.

See also my comment here:
https://code.google.com/p/fbug/issues/detail?id=5684#c3

Honza



Kumar Harsh Srivastava

unread,
Jul 18, 2014, 6:15:49 AM7/18/14
to fir...@googlegroups.com
Hi Jan,

But that is NOT what I'm asking about at all.

I'm asking why doesn't firebug show the "SENT REQUESTS" when the response hasn't come? Chrome DevTools and Firefox's built-in DevTools show the requests. (It's labelled as 'provisional requests' or something in Chrome), but the point is that they show, and firebug shows nothing while waiting for the response.

If for example, the response never comes, I can't even go to Firebug and see what Requests were sent. It's impossible.
So, I have to open Chrome or the native dev-tools and try to recreate the scenario.

Kumar Harsh Srivastava

unread,
Jul 18, 2014, 8:11:20 AM7/18/14
to fir...@googlegroups.com

here are some screenshots to make it a little more clear what I'm talking about:

I'm numbering and attaching it as google-groups is not able to attach all of them in their right places...

1. First image shows how Firebug shows it.
2. Me inspecting normal URLs (who have received the response)
3. Me trying to inspect URLs who have failed OR who are still waiting for a response.
4. Me SUCCESSFULLY being able to see the request parameters in the Firefox Developer Tools Network Tab.
5. Me Trying Chrome DevTools.
6. Me SUCCESSFULLY being able to see the request parameters in the Chrome DevTools (Note the red box: "Provisional Headers are Shown"

Firefox and Chrome show me what was sent, Headers, Query Params, Cookies, etc...
Firebug doesn't even let me click on the URL waiting for a response.
1 - firebug-issue.png
2-firebug-normal.png
3-firebug-waiting.png
4-firebug-vs-devtools-1.png
5-firebug-vs-chrome-1.png
6-firebug-vs-chrome-2.png

Sebastian Zartner

unread,
Jul 18, 2014, 9:05:44 AM7/18/14
to fir...@googlegroups.com
Thanks for the screenshots, Kumar.

I added some notes about this to issue 5684.

Sebastian

Kumar Harsh Srivastava

unread,
Jul 18, 2014, 10:24:08 AM7/18/14
to fir...@googlegroups.com
Thank you for being so prompt. I love Firebug and you guys are awesome!

Jan Honza Odvarko

unread,
Jul 18, 2014, 10:24:51 AM7/18/14
to fir...@googlegroups.com

On Friday, July 18, 2014 2:11:20 PM UTC+2, Kumar Harsh Srivastava wrote:

Firefox and Chrome show me what was sent, Headers, Query Params, Cookies, etc...
Firebug doesn't even let me click on the URL waiting for a response.
 
Ah, I see now. Sorry for misunderstanding.

Honza

Reply all
Reply to author
Forward
0 new messages