Skip to content

support for http2 #77

Closed
Closed

Description

it would be nice use this module with http2.

Activity

  1. dougwilson commented on Mar 30, 2016

    @dougwilson
    Contributor

    Hi! Does it not work? What issue does it have? Can you provide an example of how you are trying to use it?

    We need a lot more information to be able to do anything :)

  2. 890f2151c2be69c51db72017546d00fd commented on Mar 30, 2016

    @890f2151c2be69c51db72017546d00fd
    Author

    Hi

    it doesnt work.
    i try it with connect because express as far as i know doesnt support http2 yet.

    var connect = require('connect');
    var http2 = require('http2');
    var fs = require('fs');
    
    var app = connect();
    
    // gzip/deflate outgoing responses
    var compression = require('compression');
    app.use(compression());
    
    // respond to all requests
    app.use(function(req, res){
      res.end('Hello from Connect!\n');
    });
    
    
    var options = {
      key: fs.readFileSync('./localhost.key'),
      cert: fs.readFileSync('./localhost.crt'),
      passphrase: 'pass'
    };
    
    http2.createServer(options, app).listen(3000);

    it ends with error this._implicitHeader is not a function

  3. dougwilson commented on Mar 30, 2016

    @dougwilson
    Contributor

    AFAIK it should work, because the http2 module has that method. Can you provide the full stack trace for that error and what version of the "http2" module you are using is?

  4. 890f2151c2be69c51db72017546d00fd commented on Mar 30, 2016

    @890f2151c2be69c51db72017546d00fd
    Author

    here are console and debug log https://justpaste.it/srlc
    "compression": "1.6.1",
    "connect": "3.4.1",
    "http2": "3.3.2",

  5. self-assigned this
    on Mar 30, 2016
  6. dougwilson commented on Mar 30, 2016

    @dougwilson
    Contributor

    Oh, haha, I see now. They spelled it with a plural, which does not conform to compatibility with Node.js code: https://github.com/molnarg/node-http2/blob/master/lib/http.js#L738

    If you are interested in getting compatibility, I'd suggest making a pull request to http2 to add an alias to the singular form of the method name to match Node.js HTTP core.

  7. 890f2151c2be69c51db72017546d00fd commented on Mar 30, 2016

    @890f2151c2be69c51db72017546d00fd
    Author

    thank you for your time/help
    pull request in http2 created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions