Closed Bug 1151932 Opened 9 years ago Closed 9 years ago

[Network Monitor] "Edit and Resend" doesn't work for cached resources (304)

Categories

(DevTools :: Netmonitor, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: janx, Unassigned)

References

Details

(Whiteboard: [polish-backlog])

When debugging a proxy server recently, I had a hard time comparing and editing requests when cache was involved. "Copy as curl" was a life saver, but:

1. Open the DevTools at the Network Monitor.
2. Navigate to a website for which you have cached resources (code 304).
3. Click on one of the 304 requests, and go the the Headers section.
4. Click the "Edit and Resend" button, some (hard to use) input fields appear.
5. Remove all cache-related Request Headers like "If-Modified-Since", "If-None-Match" and "Cache-Control".
6. Click on "Send".

Expected:
The newly created request is sent, and shows a status code like 200 OK or 404 Not Found, with the edited Request Headers and the resulting Response Headers.

Actual:
The new request and UI all disappear. Was a new request ever sent?
Setting devedition-40 bugs to P2, filter on C17C996C-A0BE-4153-8057-FAB642D0746D
Priority: -- → P2
Depends on: 764958
This has been fixed in the meantime, closing.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Whiteboard: [devedition-40] → [polish-backlog]
Please re-open - appears this is still broken for similar cases. Identical symptoms occur if "Edit and Resend", add a "Referer" line (e.g., "Referer: http://www.google.com/") and click Send. No new request appears in the Network list, the details for the existing request are unchanged.

In my case I'm testing .htaccess rules based on "Referer" checks. The normal request is denied with a "403 Forbidden" as expected. I edit and resend with the referer header that should cause "200 OK" to be returned, but it appears no new request is sent.
Flags: needinfo?(odvarko)
(In reply to B Johnson from comment #3)
> Please re-open - appears this is still broken for similar cases. Identical
> symptoms occur if "Edit and Resend", add a "Referer" line (e.g., "Referer:
> http://www.google.com/") and click Send. No new request appears in the
> Network list, the details for the existing request are unchanged.
> 
> In my case I'm testing .htaccess rules based on "Referer" checks. The normal
> request is denied with a "403 Forbidden" as expected. I edit and resend with
> the referer header that should cause "200 OK" to be returned, but it appears
> no new request is sent.
I was following STRs from comment #0 and it works for me.
Can you please provide detailed steps to reproduce for your case?
Honza
Flags: needinfo?(odvarko)
Hi Jan - I'm guessing they fixed for certain situations, but not all - in my case, I edited a request that received a "403 Forbidden" response, modified the "Referer" header to a value that would pass authentication rules, then tried to Send. Per the original issue, no new request appears (and original is unchanged) - presumably because Referer is an ignored field under the XHR spec (see related ticket #1009748 - https://bugzilla.mozilla.org/show_bug.cgi?id=1009748). 

I can submit a new ticket if you wish, but seem redundant - though ticket #1009748 is a closer match to my issue (almost identical) than this one, so would be a better candidate to re-open. Thanks!
Flags: needinfo?(odvarko)
(In reply to B Johnson from comment #5)
> I can submit a new ticket if you wish, but seem redundant - though ticket
> #1009748 is a closer match to my issue (almost identical) than this one, so
> would be a better candidate to re-open. Thanks!
See my comment in bug 1009748 comment #10

Honza
Flags: needinfo?(odvarko)
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.