hono 4.2.8 → 4.2.9

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.
@@ -170,14 +170,11 @@ class Context {
170
170
  setHeaders(this.#headers, this.#preparedHeaders);
171
171
  if (this.#res) {
172
172
  this.#res.headers.forEach((v, k) => {
173
- if (k === "set-cookie" && this.#res) {
174
- const cookies = this.#res.headers.getSetCookie();
175
- for (const cookie of cookies) {
176
- this.#headers?.append("set-cookie", cookie);
177
- }
178
- return;
173
+ if (k === "set-cookie") {
174
+ this.#headers?.append(k, v);
175
+ } else {
176
+ this.#headers?.set(k, v);
179
177
  }
180
- this.#headers?.set(k, v);
181
178
  });
182
179
  setHeaders(this.#headers, this.#preparedHeaders);
183
180
  }
package/dist/context.js CHANGED
@@ -147,14 +147,11 @@ var Context = class {
147
147
  setHeaders(this.#headers, this.#preparedHeaders);
148
148
  if (this.#res) {
149
149
  this.#res.headers.forEach((v, k) => {
150
- if (k === "set-cookie" && this.#res) {
151
- const cookies = this.#res.headers.getSetCookie();
152
- for (const cookie of cookies) {
153
- this.#headers?.append("set-cookie", cookie);
154
- }
155
- return;
150
+ if (k === "set-cookie") {
151
+ this.#headers?.append(k, v);
152
+ } else {
153
+ this.#headers?.set(k, v);
156
154
  }
157
- this.#headers?.set(k, v);
158
155
  });
159
156
  setHeaders(this.#headers, this.#preparedHeaders);
160
157
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hono",
3
- "version": "4.2.8",
3
+ "version": "4.2.9",
4
4
  "description": "Ultrafast web framework for the Edges",
5
5
  "main": "dist/cjs/index.js",
6
6
  "type": "module",