Chromium Code Reviews| 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..a38d33facd4243f2eccd0dd591780f93a4cab54b 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,18 @@ request stages that are compatible with conditions and actions. |
| "stages" attribute. |
| </p> |
| <p> |
| +<strong>Note:</strong> If a redirect action is declared at the onHeadersReceived |
| +stage, then POST requests will be redirected using the GET method. In other cases |
|
battre
2014/03/25 00:47:30
nit: 80 characters
robwu
2014/03/25 10:08:14
Done.
|
| +the HTTP method is preserved. |
|
battre
2014/03/25 00:47:30
Why is this?
robwu
2014/03/25 10:08:14
onBeforeRequest = 307 redirect, which doesn't chan
|
| +</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> |