Coder Social home page Coder Social logo

Comments (6)

annevk avatar annevk commented on September 2, 2024

No, I think we should amend step 27 to also run its substeps when temporaryBody is non-null, agreed?

(How do you want to be acknowledged? See https://fetch.spec.whatwg.org/#acknowledgments for options, but anything goes.)

from fetch.

yutakahirano avatar yutakahirano commented on September 2, 2024

Looks good.

Please write as "平野裕 (Yutaka Hirano)". Thanks!

from fetch.

yutakahirano avatar yutakahirano commented on September 2, 2024

Oh, I didn't notice extracting init's body doesn't work when it's null (and temporaryBody is non-null). How about the following?

(27) If init's body member is present:

  1. Let stream and Content-Type be the result of extracting init's body member.
  2. Set temporaryBody to stream.
  3. If Content-Type is non-null and r's request's header list contains no header named Content-Type, append Content-Type/Content-Type to r's Headers object. Rethrow any exception.

(28) If temporaryBody is non-null and request's method is GET or HEAD, throw a TypeError.

from fetch.

annevk avatar annevk commented on September 2, 2024

Good point. However, to avoid impacting any passed in readable streams, I opted for reversing those two steps and adding a conditional to your step 28.

from fetch.

annevk avatar annevk commented on September 2, 2024

(The idea is to make failure as side effect free as it can be.)

from fetch.

wanderview avatar wanderview commented on September 2, 2024

Nice catch! Gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1154268

from fetch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.