Skip to content

not working on chrome #1

Description

@espoal

As per the post comment, the example repo doesn't work on my Ubuntu + Chrome.

I can make it work by fixing the reqPath.

Here's the req object:

   Http2ServerRequest {
     _readableState: 
      ReadableState {
        objectMode: false,
        highWaterMark: 16384,
        buffer: [Object],
        length: 0,
        pipes: null,
        pipesCount: 0,
        flowing: null,
        ended: false,
        endEmitted: false,
        reading: false,
        sync: true,
        needReadable: false,
        emittedReadable: false,
        readableListening: false,
        resumeScheduled: false,
        destroyed: false,
        defaultEncoding: 'utf8',
        awaitDrain: 0,
        readingMore: false,
        decoder: null,
        encoding: null },
     readable: true,
     domain: null,
     _events: 
      { pause: [Function: onRequestPause],
        resume: [Function: onRequestResume] },
     _eventsCount: 2,
     _maxListeners: undefined,
     [Symbol(state)]: { closed: false, didRead: false },
     [Symbol(headers)]: 
      { ':method': 'GET',
        ':authority': 'localhost:4000',
        ':scheme': 'https',
        ':path': '/',
        'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36',
        'upgrade-insecure-requests': '1',
        accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
        'accept-encoding': 'gzip, deflate, br',
        'accept-language': 'en-US,en;q=0.9,it;q=0.8' },
     [Symbol(rawHeaders)]: 
      [ ':method',
        'GET',
        ':authority',
        'localhost:4000',
        ':scheme',
        'https',
        ':path',
        '/',
        'user-agent',
        'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36',
        'upgrade-insecure-requests',
        '1',
        'accept',
        'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
        'accept-encoding',
        'gzip, deflate, br',
        'accept-language',
        'en-US,en;q=0.9,it;q=0.8' ],
     [Symbol(trailers)]: {},
     [Symbol(rawTrailers)]: [],
     [Symbol(stream)]: Http2Stream { id: 1,
  state: 
   { state: 2,
     weight: 256,
     sumDependencyWeight: 0,
     localClose: 0,
     remoteClose: 0,
     localWindowSize: 65535 },
  readableState: 
   ReadableState {
     objectMode: false,
     highWaterMark: 16384,
     buffer: BufferList { head: null, tail: null, length: 0 },
     length: 0,
     pipes: null,
     pipesCount: 0,
     flowing: false,
     ended: true,
     endEmitted: false,
     reading: false,
     sync: true,
     needReadable: false,
     emittedReadable: true,
     readableListening: false,
     resumeScheduled: false,
     destroyed: false,
     defaultEncoding: 'utf8',
     awaitDrain: 0,
     readingMore: false,
     decoder: null,
     encoding: null },
  writableState: 
   WritableState {
     objectMode: false,
     highWaterMark: 16384,
     finalCalled: false,
     needDrain: false,
     ending: false,
     ended: false,
     finished: false,
     destroyed: false,
     decodeStrings: false,
     defaultEncoding: 'utf8',
     length: 0,
     writing: false,
     corked: 0,
     sync: true,
     bufferProcessing: false,
     onwrite: [Function: bound onwrite],
     writecb: null,
     writelen: 0,
     bufferedRequest: null,
     lastBufferedRequest: null,
     pendingcb: 0,
     prefinished: false,
     errorEmitted: false,
     bufferedRequestCount: 0,
     corkedRequestsFree: 
      { next: null,
        entry: null,
        finish: [Function: bound onCorkedFinish] } } } } }
{ req: 
   Http2ServerRequest {
     _readableState: 
      ReadableState {
        objectMode: false,
        highWaterMark: 16384,
        buffer: [Object],
        length: 0,
        pipes: null,
        pipesCount: 0,
        flowing: null,
        ended: false,
        endEmitted: false,
        reading: false,
        sync: true,
        needReadable: false,
        emittedReadable: false,
        readableListening: false,
        resumeScheduled: false,
        destroyed: false,
        defaultEncoding: 'utf8',
        awaitDrain: 0,
        readingMore: false,
        decoder: null,
        encoding: null },
     readable: true,
     domain: null,
     _events: 
      { pause: [Function: onRequestPause],
        resume: [Function: onRequestResume] },
     _eventsCount: 2,
     _maxListeners: undefined,
     [Symbol(state)]: { closed: false, didRead: false },
     [Symbol(headers)]: 
      { ':method': 'GET',
        ':authority': 'localhost:4000',
        ':scheme': 'https',
        ':path': '/favicon.ico',
        'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36',
        accept: 'image/webp,image/apng,image/*,*/*;q=0.8',
        referer: 'https://localhost:4000/',
        'accept-encoding': 'gzip, deflate, br',
        'accept-language': 'en-US,en;q=0.9,it;q=0.8' },
     [Symbol(rawHeaders)]: 
      [ ':method',
        'GET',
        ':authority',
        'localhost:4000',
        ':scheme',
        'https',
        ':path',
        '/favicon.ico',
        'user-agent',
        'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36',
        'accept',
        'image/webp,image/apng,image/*,*/*;q=0.8',
        'referer',
        'https://localhost:4000/',
        'accept-encoding',
        'gzip, deflate, br',
        'accept-language',
        'en-US,en;q=0.9,it;q=0.8' ],
     [Symbol(trailers)]: {},
     [Symbol(rawTrailers)]: [],
     [Symbol(stream)]: Http2Stream { id: 3,
  state: 
   { state: 2,
     weight: 220,
     sumDependencyWeight: 256,
     localClose: 0,
     remoteClose: 0,
     localWindowSize: 65535 },
  readableState: 
   ReadableState {
     objectMode: false,
     highWaterMark: 16384,
     buffer: BufferList { head: null, tail: null, length: 0 },
     length: 0,
     pipes: null,
     pipesCount: 0,
     flowing: false,
     ended: true,
     endEmitted: false,
     reading: false,
     sync: true,
     needReadable: false,
     emittedReadable: true,
     readableListening: false,
     resumeScheduled: false,
     destroyed: false,
     defaultEncoding: 'utf8',
     awaitDrain: 0,
     readingMore: false,
     decoder: null,
     encoding: null },
  writableState: 
   WritableState {
     objectMode: false,
     highWaterMark: 16384,
     finalCalled: false,
     needDrain: false,
     ending: false,
     ended: false,
     finished: false,
     destroyed: false,
     decodeStrings: false,
     defaultEncoding: 'utf8',
     length: 0,
     writing: false,
     corked: 0,
     sync: true,
     bufferProcessing: false,
     onwrite: [Function: bound onwrite],
     writecb: null,
     writelen: 0,
     bufferedRequest: null,
     lastBufferedRequest: null,
     pendingcb: 0,
     prefinished: false,
     errorEmitted: false,
     bufferedRequestCount: 0,
     corkedRequestsFree: 
      { next: null,
        entry: null,
        finish: [Function: bound onCorkedFinish] } } } } }

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions