remove host header

This commit is contained in:
Toshit Chawda 2024-10-20 18:07:16 -07:00
parent 4c62e7a692
commit 76bda04e7c
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
6 changed files with 78 additions and 82 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "@mercuryworkshop/bare-mux", "name": "@mercuryworkshop/bare-mux",
"version": "2.1.4", "version": "2.1.5",
"description": "", "description": "",
"type": "module", "type": "module",
"scripts": { "scripts": {

View file

@ -185,9 +185,6 @@ export class BareClient {
} }
for (let i = 0; ; i++) { for (let i = 0; ; i++) {
if ('host' in headers) headers.host = urlO.host;
else headers.Host = urlO.host;
let resp = (await this.worker.sendMessage(<WorkerMessage>{ let resp = (await this.worker.sendMessage(<WorkerMessage>{
type: "fetch", type: "fetch",
fetch: { fetch: {
@ -204,7 +201,6 @@ export class BareClient {
status: resp.status, status: resp.status,
statusText: resp.statusText, statusText: resp.statusText,
}) as BareResponse; }) as BareResponse;
responseobj.rawHeaders = resp.headers;
responseobj.rawResponse = new Response(resp.body); responseobj.rawResponse = new Response(resp.body);