We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
im using the following code:
const proxy = require('http2-proxy'); const finalhandler = require('finalhandler'); const defaultWebHandler = (err, req, res) => { if (err) { console.error('proxy error', err) finalhandler(req, res)(err) } } const server = require('http2').createServer((req, res) => { console.log(req.headers) console.log(req.url) }).listen(8080) server.on('request', (req, res) => { proxy.web(req, res, { hostname: 'localhost', port: 8081 }, defaultWebHandler) })
and getting the error:
proxy error Error: Parse Error: Expected HTTP/ at Socket.socketOnData (_http_client.js:509:22) at Socket.emit (events.js:315:20) at addChunk (internal/streams/readable.js:309:12) at readableAddChunk (internal/streams/readable.js:284:9) at Socket.Readable.push (internal/streams/readable.js:223:10) at TCP.onStreamRead (internal/stream_base_commons.js:188:23) { bytesParsed: 0, code: 'HPE_INVALID_CONSTANT', reason: 'Expected HTTP/', rawPacket: <Buffer 00 00 18 04 00 00 00 00 00 00 04 00 40 00 00 00 05 00 40 00 00 00 06 00 00 20 00 fe 03 00 00 00 01 00 00 04 08 00 00 00 00 00 00 3f 00 01>, statusCode: 502, connectedSocket: true, reusedSocket: false }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
im using the following code:
and getting the error:
The text was updated successfully, but these errors were encountered: