A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.

To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).

Fetch: Difference between revisions

From WHATWG Wiki
Jump to navigation Jump to search
No edit summary
Line 25: Line 25:
* force preflight flag (set for upload progress notifications (to not reveal existence of server in case of POST I suppose; see [https://www.w3.org/Bugs/Public/show_bug.cgi?id=20322 bug 20322]))
* force preflight flag (set for upload progress notifications (to not reveal existence of server in case of POST I suppose; see [https://www.w3.org/Bugs/Public/show_bug.cgi?id=20322 bug 20322]))
* synchronous flag
* synchronous flag
* force same-origin flag (looks identical to No CORS, fail, filed [https://www.w3.org/Bugs/Public/show_bug.cgi?id=20951 bug 20951]
* force same-origin flag (looks identical to No CORS, fail, filed [https://www.w3.org/Bugs/Public/show_bug.cgi?id=20951 bug 20951])
* CORS mode
* CORS mode
** No CORS, taint (<link>, <script>, ...); still need to allow the server to opt in to CORS anyway to effectively make the resource CORS same-origin even if not requested as such (HTML does not have this feature  
** No CORS, taint (<link>, <script>, ...); still need to allow the server to opt in to CORS anyway to effectively make the resource CORS same-origin even if not requested as such (HTML does not have this feature  

Revision as of 20:26, 11 February 2013

Plan

Fetch is fetch.spec.whatwg.org and will define HTML fetch and CORS as a set of coherent algorithms rather than the intertwined mess we have now. It will also deal with the following:

  • Deal with authentication (URLs containing username/password, servers responding with 401)
  • Deal with URL processing
  • Define HTTP context for data: URLs, about:blank, and file: URLs.
  • Progress Events

Model

The basic model is Request -> Fetch -> Response.

Request

  • Parsed URL (object)
  • method (probably with restrictions as seen in XHR)
  • UA headers
  • author headers (maybe rename because people get upset with "author", with implicit restrictions as seen in XHR / CORS)
  • entity body
  • origin (object)
  • referrer source (Document / URL)
  • manual redirect flag
  • omit credentials flag (will replace HTML fetch block cookies flag but also has other features)
  • force preflight flag (set for upload progress notifications (to not reveal existence of server in case of POST I suppose; see bug 20322))
  • synchronous flag
  • force same-origin flag (looks identical to No CORS, fail, filed bug 20951)
  • CORS mode
    • No CORS, taint (<link>, <script>, ...); still need to allow the server to opt in to CORS anyway to effectively make the resource CORS same-origin even if not requested as such (HTML does not have this feature
    • No CORS, fail (<track>)
    • Anonymous
    • Credentialed

Fetch

Have a case-switch on URL scheme. See also URL. Fetch results in a network error response unless the scheme is one of

Response

Both intermediate updates (progress, headers received, ...) and final. Also indicates network error / CORS error (exposed as network error), ...