Xenophyte-coin / Xenophyte-RPC-Wallet

Xenophyte RPC Wallet especially made for exchanges, web wallet
0 stars 1 forks source link

HPE_INVALID_HEADER_TOKEN #1

Open ChandlerFerry opened 1 year ago

ChandlerFerry commented 1 year ago

Request being made: http://127.0.0.1:8000/create_wallet%7C5000

Headers received:

      _header: 'GET /create_wallet%7C5000 HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'User-Agent: axios/1.3.2\r\n' +
        'Accept-Encoding: gzip, compress, deflate, br\r\n' +
        'Host: 127.0.0.1:8000\r\n' +
        'Connection: close\r\n' +
        '\r\n',

Error Caused:

 cause: Error: Parse Error: Invalid header value char
      at Socket.socketOnData (node:_http_client:542:22)
      at Socket.emit (node:events:513:28)
      at Socket.emit (node:domain:489:12)
      at addChunk (node:internal/streams/readable:324:12)
      at readableAddChunk (node:internal/streams/readable:297:9)
      at Socket.Readable.push (node:internal/streams/readable:234:10)
      at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
    bytesParsed: 46,
    code: 'HPE_INVALID_HEADER_TOKEN',
    reason: 'Invalid header value char',
    rawPacket: Buffer(214) [Uint8Array] [
       72,  84,  84,  80,  47,  49,  46,  49,  32,  50,  48,  48,
       32,  79,  75,  10,  67, 111, 110, 116, 101, 110, 116,  45,
       84, 121, 112, 101,  58,  32,  97, 112, 112, 108, 105,  99,
       97, 116, 105, 111, 110,  47, 106, 115, 111, 110,  10,  67,
      111, 110, 116, 101, 110, 116,  45,  76, 101, 110, 103, 116,
      104,  58,  32,  49,  49,  52,  10,  65,  99,  99, 101, 115,
      115,  45,  67, 111, 110, 116, 114, 111, 108,  45,  65, 108,
      108, 111, 119,  45,  79, 114, 105, 103, 105, 110,  58,  32,
       42,  10,  10, 123,
      ... 114 more items
    ]
  }

Context: https://stackoverflow.com/questions/36628420/nodejs-request-hpe-invalid-header-token

Xenophyte-coin commented 1 year ago

Hi,

Thank you to report the issue, I think you have to try to remove the user-agent from the request.

Or it's probably a problem of timeout, this one need to be set into seconds, instead of milliseconds.