Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: chrome/common/extensions/docs/templates/intros/declarativeWebRequest.html

Issue 154473002: Support redirectUrl at onHeadersReceived in WebRequest / DWR API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix WebRequestRulesRegistrySimpleTest.StageChecker test Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/templates/intros/declarativeWebRequest.html
diff --git a/chrome/common/extensions/docs/templates/intros/declarativeWebRequest.html b/chrome/common/extensions/docs/templates/intros/declarativeWebRequest.html
index 505c6be1c4b848d9656596b5f1b494ebe536bf4b..7de1ce8f84a33a775808dac55920d1e087ab33a2 100644
--- a/chrome/common/extensions/docs/templates/intros/declarativeWebRequest.html
+++ b/chrome/common/extensions/docs/templates/intros/declarativeWebRequest.html
@@ -180,10 +180,10 @@ request stages that are compatible with conditions and actions.
<tr><td>EditRequestCookie<td><td>✓<td><td>
<tr><td>EditResponseCookie<td><td><td>✓<td>
<tr><td>IgnoreRules<td>✓<td>✓<td>✓<td>✓
- <tr><td>RedirectByRegEx<td>✓<td><td><td>
- <tr><td>RedirectRequest<td>✓<td><td><td>
- <tr><td>RedirectToEmptyDocument<td>✓<td><td><td>
- <tr><td>RedirectToTransparentImage<td>✓<td><td><td>
+ <tr><td>RedirectByRegEx<td>✓<td><td>✓<td>
+ <tr><td>RedirectRequest<td>✓<td><td>✓<td>
+ <tr><td>RedirectToEmptyDocument<td>✓<td><td>✓<td>
+ <tr><td>RedirectToTransparentImage<td>✓<td><td>✓<td>
<tr><td>RemoveRequestCookie<td><td>✓<td><td>
<tr><td>RemoveRequestHeader<td><td>✓<td><td>
<tr><td>RemoveResponseCookie<td><td><td>✓<td>
@@ -198,14 +198,19 @@ request stages that are compatible with conditions and actions.
"stages" attribute.
</p>
<p>
+<strong>Note:</strong> Redirects initiated by a redirect action use the original
+request method for the redirect, with one exception: If the redirect is
+initiated at the onHeadersReceived stage, then the redirect will be issued using
+the GET method.
+</p>
+<p>
<strong>Example:</strong> It is possible to combine a
<code>new chrome.declarativeWebRequest.RequestMatcher({contentType: ["image/jpeg"]})</code>
condition with a <code>new chrome.declarativeWebRequest.CancelRequest()</code>
action because both of them can be evaluated in the onHeadersReceived stage.
It is, however, impossible to combine the request matcher with a
-<code>new chrome.declarativeWebRequest.RedirectToTransparentImage()</code>
-because redirects cannot be executed any more by the time the content
-type has been determined.
+<code>new chrome.declarativeWebRequest.SetRequestHeader()</code>
+because request headers cannot be set any more by the time the content type has been terminated.
</p>
<h2 id="precedences">Using priorities to override rules</h2>
« no previous file with comments | « chrome/common/extensions/api/web_request.json ('k') | chrome/common/extensions/docs/templates/intros/webRequest.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698