@absolutejs/absolute 0.20.0-beta.149 → 0.20.0-beta.150

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -10599,14 +10599,20 @@ var COMPRESSIBLE_EXTENSIONS, MIN_COMPRESSIBLE_BYTES = 1024, MIN_SAVING_RATIO = 0
10599
10599
  if (request.method !== "GET" && request.method !== "HEAD")
10600
10600
  return;
10601
10601
  const { pathname } = new URL(request.url);
10602
- const available = copies.get(decodeURIComponent(pathname));
10602
+ let decodedPathname;
10603
+ try {
10604
+ decodedPathname = decodeURIComponent(pathname);
10605
+ } catch {
10606
+ return new Response("Malformed URL path", { status: 400 });
10607
+ }
10608
+ const available = copies.get(decodedPathname);
10603
10609
  if (!available)
10604
10610
  return;
10605
10611
  const chosen = acceptedEncodings(request.headers.get("accept-encoding")).find(({ encoding }) => available.has(encoding));
10606
10612
  if (!chosen)
10607
10613
  return;
10608
- const original = Bun.file(join13(root, pathname));
10609
- return new Response(Bun.file(`${join13(root, pathname)}${chosen.suffix}`), {
10614
+ const original = Bun.file(join13(root, decodedPathname));
10615
+ return new Response(Bun.file(`${join13(root, decodedPathname)}${chosen.suffix}`), {
10610
10616
  headers: {
10611
10617
  "cache-control": assetCacheControl(pathname),
10612
10618
  "content-encoding": chosen.encoding,
@@ -44084,5 +44090,5 @@ export {
44084
44090
  wrapPageHandlerWithStreamingSlots
44085
44091
  };
44086
44092
 
44087
- //# debugId=FCB0A64F35B3AA2D64756E2164756E21
44093
+ //# debugId=7B4EFE899489CD8164756E2164756E21
44088
44094
  //# sourceMappingURL=index.js.map