@fuman/net
Advanced tools
+1
-1
| { | ||
| "name": "@fuman/net", | ||
| "type": "module", | ||
| "version": "0.0.8", | ||
| "version": "0.0.9", | ||
| "description": "experimental network abstractions", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -7,2 +7,3 @@ "use strict"; | ||
| const types = require("./types.cjs"); | ||
| const HTTP1_0_OK = /* @__PURE__ */ utils.utf8.encoder.encode("HTTP/1.0 200"); | ||
| const HTTP1_1_OK = /* @__PURE__ */ utils.utf8.encoder.encode("HTTP/1.1 200"); | ||
@@ -14,3 +15,3 @@ const CR = /* @__PURE__ */ "\r".charCodeAt(0); | ||
| const res1 = await io.read.async.exactly(reader, 12); | ||
| if (!utils.typed.equal(res1, HTTP1_1_OK)) { | ||
| if (!utils.typed.equal(res1, HTTP1_0_OK) && !utils.typed.equal(res1, HTTP1_1_OK)) { | ||
| throw new types.HttpProxyConnectionError( | ||
@@ -17,0 +18,0 @@ proxy, |
@@ -5,2 +5,3 @@ import { read } from "@fuman/io"; | ||
| import { HttpProxyConnectionError } from "./types.js"; | ||
| const HTTP1_0_OK = /* @__PURE__ */ utf8.encoder.encode("HTTP/1.0 200"); | ||
| const HTTP1_1_OK = /* @__PURE__ */ utf8.encoder.encode("HTTP/1.1 200"); | ||
@@ -12,3 +13,3 @@ const CR = /* @__PURE__ */ "\r".charCodeAt(0); | ||
| const res1 = await read.async.exactly(reader, 12); | ||
| if (!typed.equal(res1, HTTP1_1_OK)) { | ||
| if (!typed.equal(res1, HTTP1_0_OK) && !typed.equal(res1, HTTP1_1_OK)) { | ||
| throw new HttpProxyConnectionError( | ||
@@ -15,0 +16,0 @@ proxy, |
92219
0.24%2405
0.08%