Implement Expect: 100-continue

This commit is contained in:
2024-02-07 15:23:14 +01:00
parent e97809253a
commit 80d7626208
7 changed files with 150 additions and 62 deletions

View File

@@ -159,6 +159,12 @@ static int local_handler(client_ctx_t *ctx) {
return 1;
}
const char *client_expect = http_get_header_field(&req->hdr, "Expect");
if (client_expect != NULL) {
res->status = http_get_status(417);
return 0;
}
res->status = http_get_status(200);
cache_init_uri(ctx->conf->cache, uri);