RESOLVED FIXED 50493
Web Inspector: [Extension API] add support for adding/overriding HTTP request headers
https://bugs.webkit.org/show_bug.cgi?id=50493
Summary Web Inspector: [Extension API] add support for adding/overriding HTTP request...
Andrey Kosyakov
Reported 2010-12-03 15:16:16 PST
Being able to modify HTTP request headers for requests generated by the inspected page would allow an extension to communicate with server via custom server (think FirePHP), control caching policies or set custom user agents.
Attachments
patch (27.90 KB, patch)
2010-12-03 15:23 PST, Andrey Kosyakov
no flags
patch (28.73 KB, patch)
2010-12-14 08:21 PST, Andrey Kosyakov
no flags
patch to land (28.61 KB, patch)
2010-12-15 11:00 PST, Andrey Kosyakov
no flags
Andrey Kosyakov
Comment 1 2010-12-03 15:23:46 PST
Pavel Feldman
Comment 2 2010-12-08 07:08:59 PST
Comment on attachment 75556 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=75556&action=review > WebCore/inspector/InspectorController.h:178 > + void applyOverrideHeaders(ResourceRequest&); Can you do this in willSendRequest instead? > WebCore/inspector/front-end/ExtensionServer.js:161 > + var allHeaders = {}; Wrong indent
Andrey Kosyakov
Comment 3 2010-12-14 08:21:31 PST
Created attachment 76538 [details] patch - now applying header overrides in InspectorController::willSendReqeust() - fixed test output stability - rebased - fixed style
Pavel Feldman
Comment 4 2010-12-15 04:41:16 PST
Comment on attachment 76538 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=76538&action=review > WebCore/inspector/InspectorController.cpp:1833 > + m_overrideHeaders->add(it->first, value); These are not necessarily "override" header since they are going to be overriden by the network stack. "Extra" headers?
Andrey Kosyakov
Comment 5 2010-12-15 11:00:48 PST
Created attachment 76668 [details] patch to land - rebased - overrideHeaders -> extraHeaders
Eric Seidel (no email)
Comment 6 2010-12-15 16:06:32 PST
Did you mean to mark you r"patch to land" with cq+ or r? or something? Or did it already get landed?
Andrey Kosyakov
Comment 7 2010-12-16 04:50:31 PST
(In reply to comment #6) > Did you mean to mark you r"patch to land" with cq+ or r? or something? Or did it already get landed? Neither -- this was meant to be "JFYI only". I'm about to land manually later at a convenient moment (the tests may be platform-sensitive and I'd like to keep an eye on them).
Andrey Kosyakov
Comment 8 2010-12-17 04:37:31 PST
Note You need to log in before you can comment on or make changes to this bug.