GithubHelp home page GithubHelp logo

http2: status of push API about http2 HOT 5 CLOSED

nodejs avatar nodejs commented on July 18, 2024
http2: status of push API

from http2.

Comments (5)

robertkowalski avatar robertkowalski commented on July 18, 2024

Question: Do we want to support legacy APIs?

test-http-set-cookies.js uses a currently not documented way to set headers (note the nested array instead of a flat object):

    res.writeHead(200, [['set-cookie', 'A'],
                        ['set-cookie', 'B'],
                        ['content-type', 'text/plain']]);

I'm in favor of just supporting objects. However I remember somehow from this morning that the goal is to support as much of the old behaviour as possible. What do you think @nodejs/http2 ?

from http2.

mcollina avatar mcollina commented on July 18, 2024

@robertkowalski I'd focus on documented behavior.

from http2.

jasnell avatar jasnell commented on July 18, 2024

For now, definitely focus on documented behavior. We can revisit this once we have that done and working.

from http2.

sebdeckers avatar sebdeckers commented on July 18, 2024

🤔 Is this issue discussing server push support or header API compatibility?

The compatibility layer in #47 tries to stay true to the documented APIs, for headers on the request and response. Cookies are not yet supported. I don't think it's prohibitively difficult but would rather leave it for a separate PR.

FWIW, core currently uses an Object for headers and trailers. That could be changed to using a Map or linked list.

from http2.

mcollina avatar mcollina commented on July 18, 2024

I think we can close this now.

from http2.

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.