GithubHelp home page GithubHelp logo

Comments (4)

jbr avatar jbr commented on June 3, 2024

async-h1 is currently an http/1.1 library and does not yet support http/1.0. you're right that the differences are minor, but as of the current release of http-types and async-h1, it is exclusively http/1.1

from async-h1.

vulpyne avatar vulpyne commented on June 3, 2024

Is there anything in a HTTP/1.0 response that would cause issues with a HTTP/1.1 parser? If not, what is the benefit of explicitly refusing to handle a HTTP/1.0 response?

from async-h1.

jbr avatar jbr commented on June 3, 2024

It's not that we couldn't add support for 1.0 at some point (and I've started in on that in the v3 branch) but that the current version of async-h1 is intended to be an async http/1.1 client and server. I believe you're right that http/1.0 would be trivial to support on the client side

from async-h1.

vulpyne avatar vulpyne commented on June 3, 2024

Trivial or not, I would expect someone else to do it for me. Would you accept a pull request that just changed the conditional to not explicitly error out on a HTTP/1.0 response? i.e. change it to ensure!(version < 2, "Unsupported HTTP version");

If you wanted to be super-safe I guess there could even be a feature flag that allowed rejecting those responses as before, although I personally don't really see the advantage.

from async-h1.

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.