Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
4f66a21d
Commit
4f66a21d
authored
Mar 13, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename "rxhdrs" to "rxreqhdrs" and add "rxresphdrs"
parent
80a44322
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
4 deletions
+28
-4
r01356.vtc
bin/varnishtest/tests/r01356.vtc
+1
-1
vtc_http.c
bin/varnishtest/vtc_http.c
+27
-3
No files found.
bin/varnishtest/tests/r01356.vtc
View file @
4f66a21d
varnishtest "#1356, req.body failure"
server s1 {
rxhdrs
rx
req
hdrs
expect_close
} -start
...
...
bin/varnishtest/vtc_http.c
View file @
4f66a21d
...
...
@@ -233,8 +233,12 @@ cmd_http_expect(CMD_ARGS)
AN
(
av
[
2
]);
AZ
(
av
[
3
]);
lhs
=
cmd_var_resolve
(
hp
,
av
[
0
]);
if
(
lhs
==
NULL
)
lhs
=
"<missing>"
;
cmp
=
av
[
1
];
rhs
=
cmd_var_resolve
(
hp
,
av
[
2
]);
if
(
rhs
==
NULL
)
rhs
=
"<missing>"
;
if
(
!
strcmp
(
cmp
,
"=="
))
{
retval
=
strcmp
(
lhs
,
rhs
)
==
0
;
}
else
if
(
!
strcmp
(
cmp
,
"<"
))
{
...
...
@@ -541,6 +545,25 @@ cmd_http_rxresp(CMD_ARGS)
vtc_log
(
hp
->
vl
,
4
,
"bodylen = %s"
,
hp
->
bodylen
);
}
static
void
cmd_http_rxresphdrs
(
CMD_ARGS
)
{
struct
http
*
hp
;
(
void
)
cmd
;
(
void
)
vl
;
CAST_OBJ_NOTNULL
(
hp
,
priv
,
HTTP_MAGIC
);
ONLY_CLIENT
(
hp
,
av
);
assert
(
!
strcmp
(
av
[
0
],
"rxresphdrs"
));
av
++
;
for
(;
*
av
!=
NULL
;
av
++
)
vtc_log
(
hp
->
vl
,
0
,
"Unknown http rxreq spec: %s
\n
"
,
*
av
);
http_rxhdr
(
hp
);
http_splitheader
(
hp
,
0
);
}
/**********************************************************************
* Ungzip rx'ed body
*/
...
...
@@ -802,14 +825,14 @@ cmd_http_rxreq(CMD_ARGS)
}
static
void
cmd_http_rxhdrs
(
CMD_ARGS
)
cmd_http_rx
req
hdrs
(
CMD_ARGS
)
{
struct
http
*
hp
;
(
void
)
cmd
;
(
void
)
vl
;
CAST_OBJ_NOTNULL
(
hp
,
priv
,
HTTP_MAGIC
);
assert
(
!
strcmp
(
av
[
0
],
"rxhdrs"
));
assert
(
!
strcmp
(
av
[
0
],
"rx
req
hdrs"
));
av
++
;
for
(;
*
av
!=
NULL
;
av
++
)
...
...
@@ -1169,12 +1192,13 @@ static const struct cmds http_cmds[] = {
{
"txreq"
,
cmd_http_txreq
},
{
"rxreq"
,
cmd_http_rxreq
},
{
"rx
hdrs"
,
cmd_http_rx
hdrs
},
{
"rx
reqhdrs"
,
cmd_http_rxreq
hdrs
},
{
"rxchunk"
,
cmd_http_rxchunk
},
{
"rxbody"
,
cmd_http_rxbody
},
{
"txresp"
,
cmd_http_txresp
},
{
"rxresp"
,
cmd_http_rxresp
},
{
"rxresphdrs"
,
cmd_http_rxresphdrs
},
{
"gunzip"
,
cmd_http_gunzip_body
},
{
"expect"
,
cmd_http_expect
},
{
"send"
,
cmd_http_send
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment