Export to GitHub

fbug - issue #7585

Script panel loads POST-requested sources with GET, when Net panel is disabled


Posted on Jul 7, 2014 by Grumpy Camel

What got committed in issue 7401 was only a work-around. There's no way to fully fix this (with sourceCache half gone), but we should at least strive to perform a POST request instead of GET when encountering this case, so we can hope to hit the cache, and send the same data to the server if we miss it (unless we have a chance to stop that second load, I don't know).

I think sourceCache has some code that we can use for this. It should definitely be possible, as evidenced by "View Source".

Issue 7575 has a test case (available for a few more days, at least).

Comment #1

Posted on Jul 30, 2014 by Grumpy Camel

https://github.com/firebug/firebug/commit/f5f027cb4fc1ef31062e07298a353213cad15527

If the response is not in Firefox's cache (e.g. with "Disable Browser Cache" enabled, but Net panel still disabled), a GET is performed. This would be trivial to change but it comforts me to not make automatic double POST requests because non-idempotence etc. The cache ought to be hit in most practical cases I think.

This PHP file works as a test-case: https://gist.github.com/simonlindholm/56331ad07b9854149297

Attaching a test build.

Attachments

Comment #2

Posted on Jul 31, 2014 by Helpful Wombat

Works fine for me (testing with master). I just get one POST request instead of two requests in 2.0.2.

Sebastian

Comment #3

Posted on Jul 31, 2014 by Swift Rhino

Works fine for me (firebug-issue7585.xpi). Thanks

David

Comment #4

Posted on Aug 14, 2014 by Massive Wombat

This issue has been fixed in Firebug 2.0.3 https://addons.mozilla.org/en-US/firefox/addon/firebug/

(the XPI doesn't appear on getfirebug.com yet due to: https://bugzilla.mozilla.org/show_bug.cgi?id=1053646)

Please let us know how it works for you.

Thanks for the help! Honza

Status: Fixed

Labels:
Type-Defect debugger platform 2.0.2 fixed-2.0.3