You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2021/11/11 02:31:50 UTC
svn commit: r1894940 - /httpd/apreq/trunk/library/parser_header.c
Author: ylavic
Date: Thu Nov 11 02:31:50 2021
New Revision: 1894940
URL: http://svn.apache.org/viewvc?rev=1894940&view=rev
Log:
Follow up to r1894937: reindent (no functional change).
Modified:
httpd/apreq/trunk/library/parser_header.c
Modified: httpd/apreq/trunk/library/parser_header.c
URL: http://svn.apache.org/viewvc/httpd/apreq/trunk/library/parser_header.c?rev=1894940&r1=1894939&r2=1894940&view=diff
==============================================================================
--- httpd/apreq/trunk/library/parser_header.c (original)
+++ httpd/apreq/trunk/library/parser_header.c Thu Nov 11 02:31:50 2021
@@ -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(¶m, 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(¶m, 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(¶m->v, t);
- ctx->nlen = 0;
- ctx->vlen = 0;
- ctx->glen = 0;
+ apreq_value_table_add(¶m->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++];