Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

Make 'as' attribute mandatory #15

Merged
merged 2 commits into from
Apr 1, 2015
Merged

Make 'as' attribute mandatory #15

merged 2 commits into from
Apr 1, 2015

Conversation

igrigorik
Copy link
Member

See #2 for background. Closes #2.

  • as is mandatory
  • as value must be a valid fetch context
  • if omitted, UA should report a warning and abort

See #2 for background. Closes #2.

- as is mandatory
- as value must be a valid fetch context
- if omitted, UA should report a warning and abort
<li>The specified <code><a>as</a></code> value MUST be a valid <a href="http://fetch.spec.whatwg.org/#concept-request-context">request context</a> as defined in [[FETCH]].</li>
<li>If the <code><a>as</a></code> attribute is missing, the user agent MUST assign a default context.</li>
<li>If the <code><a>as</a></code> attribute is omitted, or the value contains an invalid request context, then the user agent SHOULD output a developer-friendly warning and abort the fetch.</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "Must abort the fetch" to avoid various UAs acting differently on such authoring errors?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't enforce a MUST. E.g. there is no way to abort an inflight HTTP/1 request short of sending a TCP RST, which carries a high penalty and requirement to open a new connection... which may or may not make sense, and this should be deferred to the UA.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, are we talking about an in-flight fetch here?

igrigorik added a commit that referenced this pull request Apr 1, 2015
Make 'as' attribute mandatory
@igrigorik igrigorik merged commit c32211d into gh-pages Apr 1, 2015
@igrigorik igrigorik deleted the mandatory-as branch June 10, 2015 21:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make "as" attribute mandatory?
2 participants