Skip to content

Commit 2b982f0

Browse files
committed
chore(http): clean up
1 parent 6a5b0a6 commit 2b982f0

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/interceptors/net/http-interceptor.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ export class HttpRequestInterceptor extends Interceptor<HttpRequestEventMap> {
3232
socket.once('write', (chunk, encoding) => {
3333
const firstFrame = chunk.toString()
3434

35-
/**
36-
* @fixme This is obviously rather naive
37-
*/
38-
if (firstFrame.includes('HTTP/1.1')) {
35+
if (firstFrame.includes('HTTP/')) {
3936
const method = firstFrame.split(' ')[0]
4037

4138
const requestParser = createHttpRequestParserStream({
@@ -66,7 +63,7 @@ export class HttpRequestInterceptor extends Interceptor<HttpRequestEventMap> {
6663
console.log('REQ! handled?', isRequestHandled)
6764

6865
if (!isRequestHandled) {
69-
// return socket.passthrough()
66+
return socket.passthrough()
7067
}
7168
},
7269
})

0 commit comments

Comments
 (0)