summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2021-11-11 03:33:41 +0100
committerYann Ylavic <ylavic@apache.org>2021-11-11 03:33:41 +0100
commit968525cbec6851115a894630b710f4faa8cb4079 (patch)
tree808a659329eb66401533462a465f665cd188d0c2 /server
parentapreq: Sync latest changes from lib apreq. (diff)
downloadapache2-968525cbec6851115a894630b710f4faa8cb4079.tar.xz
apache2-968525cbec6851115a894630b710f4faa8cb4079.zip
apreq: Sync r1894940 from libapreq.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1894941 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r--server/apreq_parser_header.c56
1 files changed, 27 insertions, 29 deletions
diff --git a/server/apreq_parser_header.c b/server/apreq_parser_header.c
index 55e0beaf75..c420a91a00 100644
--- a/server/apreq_parser_header.c
+++ b/server/apreq_parser_header.c
@@ -41,7 +41,7 @@ struct hdr_ctx {
HDR_GAP,
HDR_VALUE,
HDR_NEWLINE,
- HDR_CONTLINE,
+ HDR_FOLDLINE,
HDR_WANTLINE,
HDR_NEXTLINE,
HDR_LASTLINE,
@@ -343,41 +343,39 @@ APREQ_DECLARE_PARSER(apreq_parse_headers)
if (off == dlen)
break;
- {
- ch = data[off];
- switch (ch) {
- case ' ':
- case '\t':
- ++off;
- ++ctx->vlen;
- break;
+ ch = data[off];
+ switch (ch) {
+ case ' ':
+ case '\t':
+ ++off;
+ ++ctx->vlen;
+ break;
- default:
- /* can parse brigade now */
- if (off > 0)
- apr_bucket_split(e, off);
- s = split_header_line(&param, pool, ctx->bb, ctx->nlen, ctx->glen, ctx->vlen);
- if (parser->hook != NULL && s == APR_SUCCESS)
- s = apreq_hook_run(parser->hook, param, NULL);
- if (s != APR_SUCCESS) {
- ctx->status = HDR_ERROR;
- return s;
- }
+ default:
+ /* can parse brigade now */
+ if (off > 0)
+ apr_bucket_split(e, off);
+ s = split_header_line(&param, pool, ctx->bb, ctx->nlen, ctx->glen, ctx->vlen);
+ if (parser->hook != NULL && s == APR_SUCCESS)
+ s = apreq_hook_run(parser->hook, param, NULL);
+ if (s != APR_SUCCESS) {
+ ctx->status = HDR_ERROR;
+ return s;
+ }
- apreq_value_table_add(&param->v, t);
- ctx->nlen = 0;
- ctx->vlen = 0;
- ctx->glen = 0;
+ apreq_value_table_add(&param->v, t);
+ ctx->nlen = 0;
+ ctx->vlen = 0;
+ ctx->glen = 0;
- ctx->status = HDR_NEXTLINE;
- goto parse_hdr_bucket;
- }
+ ctx->status = HDR_NEXTLINE;
+ goto parse_hdr_bucket;
}
/* fall thru */
- ctx->status = HDR_CONTLINE;
+ ctx->status = HDR_FOLDLINE;
- case HDR_CONTLINE:
+ case HDR_FOLDLINE:
while (off < dlen) {
ch = data[off++];