Skip to content

Commit ae46e88

Browse files
committed
Reuse storage for header_start
1 parent 488445e commit ae46e88

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib/lwan-thread.c

+2
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ __attribute__((noreturn)) static int process_request_coro(struct coro *coro,
451451
/* NOTE: This function should not return; coro_yield should be used
452452
* instead. This ensures the storage for `strbuf` is alive when the
453453
* coroutine ends and lwan_strbuf_free() is called. */
454+
char *header_start[N_HEADER_START];
454455
struct lwan_connection *conn = data;
455456
struct lwan *lwan = conn->thread->lwan;
456457
int fd = lwan_connection_get_fd(lwan, conn);
@@ -511,6 +512,7 @@ __attribute__((noreturn)) static int process_request_coro(struct coro *coro,
511512
.buffer = &buffer,
512513
.next_request = next_request,
513514
.error_when_n_packets = error_when_n_packets,
515+
.header_start = header_start,
514516
};
515517
struct lwan_request request = {.conn = conn,
516518
.global_response_headers = &lwan->headers,

0 commit comments

Comments
 (0)