Web Request API: Cancel is allowed on all stages which support blocking. |
||
Issue descriptionChrome Version: 56.0.2924.87 The Web Request API documentation states that the cancel parameter of BlockingResponse can only be used in the onBeforeRequest stage of a web request. See https://developer.chrome.com/extensions/webRequest#type-BlockingResponse. However in practice, cancelling the request is supported on all stages which support blocking, namely- -onBeforeRequest -onBeforeSendHeaders -onHeadersReceived -onAuthRequired
,
Feb 23 2017
Seems the documentation is inconsistent. Some places do specify that cancellation is allowed for other stages. Will update the docs.
,
Feb 23 2017
updating docs to reflect code sgtm.
,
Aug 29 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ba9fcdb8648ddcf577f121ba908df84888bd8056 commit ba9fcdb8648ddcf577f121ba908df84888bd8056 Author: Karan Bhatia <karandeepb@chromium.org> Date: Tue Aug 29 03:56:49 2017 WebRequest API Docs: Clarify the stages in which request can be cancelled. The current documentation for the Web Request API is a bit unclear on the network request stages in which a network request can be cancelled. Update the docs to reflect that a network request can be cancelled in the onBeforeRequest, onBeforeSendHeaders, onHeadersReceived and onAuthRequired stages. BUG= 695303 Change-Id: I6464a21aa5049d17d70027c7a5c8748e7ba1e81b Reviewed-on: https://chromium-review.googlesource.com/639234 Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org> Commit-Queue: Karan Bhatia <karandeepb@chromium.org> Cr-Commit-Position: refs/heads/master@{#498017} [modify] https://crrev.com/ba9fcdb8648ddcf577f121ba908df84888bd8056/chrome/common/extensions/docs/templates/intros/webRequest.html [modify] https://crrev.com/ba9fcdb8648ddcf577f121ba908df84888bd8056/extensions/common/api/web_request.json
,
Aug 29 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by karandeepb@chromium.org
, Feb 23 2017