diff options
author | Eric Wong <e@80x24.org> | 2023-01-09 05:52:27 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-01-09 06:22:08 +0000 |
commit | ee995d418cc8cfcb148159d84c4f1d6f40108b6d (patch) | |
tree | 5a251d39ac6052da1d8dba7065cf34bcb7bdbe25 | |
parent | 043831f7eba50524416b97a25314a52f2506fb77 (diff) | |
download | mwrap-ee995d418cc8cfcb148159d84c4f1d6f40108b6d.tar.gz |
This is more consistent with the `MWRAP=bt:' use, since adding `-Depth' seems unnecessary and makes curl commands too long.
-rw-r--r-- | ext/mwrap/httpd.h | 2 | ||||
-rw-r--r-- | t/httpd.t | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/mwrap/httpd.h b/ext/mwrap/httpd.h index cea79f7..5c3b83f 100644 --- a/ext/mwrap/httpd.h +++ b/ext/mwrap/httpd.h @@ -899,7 +899,7 @@ static enum mw_qev h1_parse_harder(struct mw_h1 *h1, struct mw_h1req *h1r, * request bodies, so let pico handle parameters in * HTTP request headers, instead. */ - if (NAME_EQ(hdr, "X-Mwrap-BT-Depth")) { + if (NAME_EQ(hdr, "X-Mwrap-BT")) { errno = 0; depth = strtol(hdr->value, &end, 10); if (errno || !valid_end(end)) @@ -174,12 +174,12 @@ SKIP: { $rc = system(@curl, qw(-d x=y), "http://0/$pid/reset"); is($rc, 0, 'curl /reset'); - $rc = system(@curl, qw(-HX-Mwrap-BT-Depth:10 -XPOST), + $rc = system(@curl, qw(-HX-Mwrap-BT:10 -XPOST), "http://0/$pid/ctl"); - is($rc, 0, 'curl /ctl (X-Mwrap-BT-Depth)'); + is($rc, 0, 'curl /ctl (X-Mwrap-BT)'); like(slurp($cout), qr/\bMWRAP=bt:10\b/, 'changed bt depth'); - $rc = system(@curl, qw(-HX-Mwrap-BT-Depth:10 -d blah http://0/ctl)); + $rc = system(@curl, qw(-HX-Mwrap-BT:10 -d blah http://0/ctl)); is($rc >> 8, 22, '404 w/o PID prefix'); }; |