Skip to content

Commit 945fdbd

Browse files
committed
Sync package-lock.json & server/dist/
1 parent b832887 commit 945fdbd

File tree

3 files changed

+22
-31
lines changed

3 files changed

+22
-31
lines changed

package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/dist/codeql-development-mcp-server.js

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -55658,17 +55658,15 @@ var Response2 = class _Response {
5565855658
this.#init = init;
5565955659
}
5566055660
if (typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array) {
55661-
;
55662-
this[cacheKey] = [init?.status || 200, body, headers || init?.headers];
55661+
headers ||= init?.headers || { "content-type": "text/plain; charset=UTF-8" };
55662+
this[cacheKey] = [init?.status || 200, body, headers];
5566355663
}
5566455664
}
5566555665
get headers() {
5566655666
const cache = this[cacheKey];
5566755667
if (cache) {
5566855668
if (!(cache[2] instanceof Headers)) {
55669-
cache[2] = new Headers(
55670-
cache[2] || { "content-type": "text/plain; charset=UTF-8" }
55671-
);
55669+
cache[2] = new Headers(cache[2]);
5567255670
}
5567355671
return cache[2];
5567455672
}
@@ -55793,32 +55791,15 @@ var flushHeaders = (outgoing) => {
5579355791
};
5579455792
var responseViaCache = async (res, outgoing) => {
5579555793
let [status, body, header] = res[cacheKey];
55796-
let hasContentLength = false;
55797-
if (!header) {
55798-
header = { "content-type": "text/plain; charset=UTF-8" };
55799-
} else if (header instanceof Headers) {
55800-
hasContentLength = header.has("content-length");
55794+
if (header instanceof Headers) {
5580155795
header = buildOutgoingHttpHeaders(header);
55802-
} else if (Array.isArray(header)) {
55803-
const headerObj = new Headers(header);
55804-
hasContentLength = headerObj.has("content-length");
55805-
header = buildOutgoingHttpHeaders(headerObj);
55806-
} else {
55807-
for (const key in header) {
55808-
if (key.length === 14 && key.toLowerCase() === "content-length") {
55809-
hasContentLength = true;
55810-
break;
55811-
}
55812-
}
5581355796
}
55814-
if (!hasContentLength) {
55815-
if (typeof body === "string") {
55816-
header["Content-Length"] = Buffer.byteLength(body);
55817-
} else if (body instanceof Uint8Array) {
55818-
header["Content-Length"] = body.byteLength;
55819-
} else if (body instanceof Blob) {
55820-
header["Content-Length"] = body.size;
55821-
}
55797+
if (typeof body === "string") {
55798+
header["Content-Length"] = Buffer.byteLength(body);
55799+
} else if (body instanceof Uint8Array) {
55800+
header["Content-Length"] = body.byteLength;
55801+
} else if (body instanceof Blob) {
55802+
header["Content-Length"] = body.size;
5582255803
}
5582355804
outgoing.writeHead(status, header);
5582455805
if (typeof body === "string" || body instanceof Uint8Array) {

0 commit comments

Comments
 (0)