Http Status result doesn't show as HTML response

104 views
Skip to first unread message

Chris Marisic

unread,
Mar 4, 2011, 10:11:15 AM3/4/11
to fir...@googlegroups.com
I've recently been working on REST web services and verifying their accessibility in Firefox & Firebug. One thing I've found very confusing is at times where it appears that my Net panel is completely empty almost as if I did not make a request to the server at all. This occurs when a url returns an empty response other than Http Status code & http status code description.

I really think these should be displayed under the HTML filter of the NET panel since that IS the html response, it's just empty.

Honza (Jan Odvarko)

unread,
Mar 4, 2011, 10:14:50 AM3/4/11
to Firebug
Any chance I could use your page to repro the problem on my machine?
(or any other page I could use as a test case)
Honza

Chris Marisic

unread,
Mar 4, 2011, 10:24:10 AM3/4/11
to fir...@googlegroups.com
It would take some time that I could put this up in a manner that's accessible to the internet, any chance do you program with ASP.NET MVC at all? Because creating this case is completely trivial all you need to do is have a controller return a new HttpStatusCodeResult(400, "bad request")

Honza (Jan Odvarko)

unread,
Mar 4, 2011, 10:31:50 AM3/4/11
to Firebug
On Mar 4, 4:24 pm, Chris Marisic <ch...@marisic.com> wrote:
> It would take some time that I could put this up in a manner that's
> accessible to the internet,
That would be great, as soon as I have reproducible test case I can
fix it!

> any chance do you program with ASP.NET MVC at all?
No

> Because creating this case is completely trivial all you need to do is
> have a controller return a new HttpStatusCodeResult(400, "bad request")
If it's trivial please do the test case (it's a great help for us).

Thanks!

Btw. just to note that the Net panel displays only net requests that
were
initiated from the current page.

Honza

Chris Marisic

unread,
Mar 4, 2011, 11:10:51 AM3/4/11
to fir...@googlegroups.com
Attached is a working sample

FirebugTest - solution root
> FirebugTest  - project code
> web - published web application

This is for IIS7+ with .NET4, if that's a problem I can probably back down the project to be compatible with .NET 2.
FirebugTest.7z

Chris Marisic

unread,
Mar 4, 2011, 11:13:05 AM3/4/11
to fir...@googlegroups.com
Last notes, once you setup the web application in IIS, you should be able to navigate to the site index, when you click the menu to goto About (or directly goto localhost/web/Home/About) you will see the page returns only a http status code of 418 and a http status description of "I'm a teapot".  This shows up on the ALL settings of firebug, however when on HTML it is not visible

Sam

unread,
Mar 4, 2011, 11:25:22 AM3/4/11
to Firebug
if you downgrade the app to 2.0 i could post it in my server, i´ve
been having this issue from time to time and i would like to know how
to solve this

Chris Marisic

unread,
Mar 4, 2011, 3:14:17 PM3/4/11
to fir...@googlegroups.com
Attached is a working sample for .NET 2

FirebugTest2 - solution root
> FirebugTest2  - project code

> web - published web application

Basically the entire code for this is


        protected void Application_BeginRequest(object sender, EventArgs e)
        {
            Response.StatusCode = 418;
            Response.StatusDescription = "I'm a teapot";
            Response.End();
        }

inside the global.asax, so when you browse to any page you should get the 418 response.
FirebugTest2.7z

Sam

unread,
Mar 4, 2011, 4:11:53 PM3/4/11
to Firebug
hi guys, you can test this on http://www.competitivo.com.mx/firebug/

if you need anything, gimme a whistle

Honza (Jan Odvarko)

unread,
Mar 5, 2011, 2:18:24 AM3/5/11
to Firebug


On Mar 4, 10:11 pm, Sam <sam....@gmail.com> wrote:
> hi guys, you can test this onhttp://www.competitivo.com.mx/firebug/
Great, thanks!

So, if I enable the Net panel and refresh the page I can see one
request.

See here:
http://www.softwareishard.com/har/viewer/?inputUrl=http%3A%2F%2Fwww.showslow.com%2Fdetails%2Fhar.php%3Fid%3D1065callback%3DonInputData

Is that what you see?

What else should I see?

Honza

Chris Marisic

unread,
Mar 7, 2011, 8:26:57 AM3/7/11
to fir...@googlegroups.com
The result is not displayed as a HTML response on the NET panel which IMO is a bug because it's a HTML response even if it's the empty response, it's not any other kind of response, it still is the html it's just empty.
 

On Saturday, March 5, 2011 2:18:24 AM UTC-5, Honza (Jan Odvarko) wrote:
firebug.png

Honza (Jan Odvarko)

unread,
Mar 7, 2011, 12:07:20 PM3/7/11
to Firebug
So, the question is, why your Net panel output is different then main?

Here is my detailed steps to reproduce. My configuration:
Vista + Firefox 4b13pre + Firebug 1.7b1

0) Open Firebug
1) Enable and select the Net panel
2) Load: http://www.competitivo.com.mx/firebug/
3) I see one request in the Net panel.

I have exported the Net panel content as I see it (as a HAR log) here:
http://www.softwareishard.com/har/viewer/?inputUrl=http%3A%2F%2Fwww.showslow.com%2Fdetails%2Fhar.php%3Fid%3D1065callback%3DonInputData

So, if you perform exact same steps, you don't see anything in the Net
panel?
Honza

dmccunney

unread,
Mar 7, 2011, 12:18:16 PM3/7/11
to fir...@googlegroups.com
On Mon, Mar 7, 2011 at 12:07 PM, Honza (Jan Odvarko) <odv...@gmail.com> wrote:
> So, the question is, why your Net panel output is different then main?
>
> Here is my detailed steps to reproduce. My configuration:
> Vista + Firefox 4b13pre + Firebug 1.7b1
>
> 0) Open Firebug
> 1) Enable and select the Net panel
> 2) Load: http://www.competitivo.com.mx/firebug/
> 3) I see one request in the Net panel.

When I do it. with FF 4.0 BetaPre13 and the current Firebug release, I
see the "I'm a teapot" in the All section of the Net panel, as in the
attachment. I think the poster believes it should show up in the HTML
section.
_____
Dennis

Firebug_capture.jpg

Honza (Jan Odvarko)

unread,
Mar 7, 2011, 12:35:03 PM3/7/11
to Firebug
On Mar 7, 6:18 pm, dmccunney <dennis.mccun...@gmail.com> wrote:
> When I do it. with FF 4.0 BetaPre13 and the current Firebug release, I
> see the "I'm a teapot" in the All section of the Net panel, as in the
> attachment.  I think the poster believes it should show up in the HTML
> section
Ah, correct

When debugging this, I see (Firefox says) that the mime-type of the
response is text/plain.
That's why it's filtered out when HTML filter is selected.

So, it looks like it isn't HTML response.

Honza

Chris Marisic

unread,
Mar 7, 2011, 2:36:26 PM3/7/11
to fir...@googlegroups.com
My guess is that's what Firefox uses as the default mime-type if the server doesn't send a header for a different content type? I guess that does leave this in a gray area.

With this being said, maybe it would be worthwhile to explain more of my thought process when using Firebug. I'm a .NET developer so if I'm using the net panel of Firebug 98%+ of the time I'm only concerned about seeing the query string parameters of requests, and any single or chain of response redirects that occur through then.

When the net panel is on All alot of requests for the css/js/imgs etc will spill into it making it hard to locate the true page requests themselves which setting it to html generally fixes this. However when shifting from debugging pages to a rest service in browser you end up in the situation that brought me to posting what I felt was a bug.

Maybe what I'm really interested in is there being Parent / Parent Only as a filter option that will only show you the information sent back by the server and none of the child requests such as the img/css/js requests etc.
Reply all
Reply to author
Forward
0 new messages