@absolutejs/absolute 0.19.0-beta.1074 → 0.19.0-beta.1075

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.
@@ -2478,11 +2478,12 @@ var STREAMING_PAGE_HEADER = "x-absolute-stream", HTML_CONTENT_TYPE = "text/html"
2478
2478
  headers.set("content-type", HTML_CONTENT_TYPE);
2479
2479
  headers.set(STREAMING_PAGE_HEADER, "1");
2480
2480
  return headers;
2481
- }, computeEtag = (html) => `W/"${createHash2("sha1").update(html).digest("base64url")}"`, withPageCacheHeaders = async (response, request) => {
2481
+ }, computeEtag = (html) => `W/"${createHash2("sha1").update(html).digest("base64url")}"`, withPageCacheHeaders = async (response, request, options) => {
2482
2482
  const contentType = response.headers.get("content-type") ?? "";
2483
2483
  if (!contentType.includes(HTML_CONTENT_TYPE))
2484
2484
  return response;
2485
- if (response.headers.get(STREAMING_PAGE_HEADER) === "1" || !response.body) {
2485
+ const isStreaming = response.headers.get(STREAMING_PAGE_HEADER) === "1";
2486
+ if (isStreaming && !options?.bufferStreamForEtag || !response.body) {
2486
2487
  response.headers.delete(STREAMING_PAGE_HEADER);
2487
2488
  response.headers.set("cache-control", "no-cache");
2488
2489
  return response;
@@ -2496,6 +2497,7 @@ var STREAMING_PAGE_HEADER = "x-absolute-stream", HTML_CONTENT_TYPE = "text/html"
2496
2497
  });
2497
2498
  }
2498
2499
  const headers = new Headers(response.headers);
2500
+ headers.delete(STREAMING_PAGE_HEADER);
2499
2501
  headers.set("cache-control", "no-cache");
2500
2502
  headers.set("etag", etag);
2501
2503
  return new Response(html, {
@@ -6450,5 +6452,5 @@ export {
6450
6452
  ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
6451
6453
  };
6452
6454
 
6453
- //# debugId=F341C201FBD8A0F864756E2164756E21
6455
+ //# debugId=D2A717D42FCCB58164756E2164756E21
6454
6456
  //# sourceMappingURL=server.js.map