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
496d27f0
Commit
496d27f0
authored
Oct 30, 2014
by
Poul-Henning Kamp
Committed by
Martin Blix Grydeland
Nov 05, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make it possible to receive resphdrs and respbody separately.
Always interpret C-L in decimal
parent
7d633a38
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
4 deletions
+23
-4
vtc_http.c
bin/varnishtest/vtc_http.c
+23
-4
No files found.
bin/varnishtest/vtc_http.c
View file @
496d27f0
...
...
@@ -469,7 +469,7 @@ http_swallow_body(struct http *hp, char * const *hh, int body)
p
=
http_find_header
(
hh
,
"content-length"
);
if
(
p
!=
NULL
)
{
hp
->
body
=
hp
->
rxbuf
+
hp
->
prxbuf
;
l
=
strtoul
(
p
,
NULL
,
0
);
l
=
strtoul
(
p
,
NULL
,
1
0
);
(
void
)
http_rxchar
(
hp
,
l
,
0
);
vtc_dump
(
hp
->
vl
,
4
,
"body"
,
hp
->
body
,
l
);
hp
->
bodyl
=
l
;
...
...
@@ -873,7 +873,7 @@ cmd_http_rxreqhdrs(CMD_ARGS)
}
static
void
cmd_http_rxbody
(
CMD_ARGS
)
cmd_http_rx
req
body
(
CMD_ARGS
)
{
struct
http
*
hp
;
...
...
@@ -881,7 +881,7 @@ cmd_http_rxbody(CMD_ARGS)
(
void
)
vl
;
CAST_OBJ_NOTNULL
(
hp
,
priv
,
HTTP_MAGIC
);
ONLY_SERVER
(
hp
,
av
);
AZ
(
strcmp
(
av
[
0
],
"rxbody"
));
AZ
(
strcmp
(
av
[
0
],
"rx
req
body"
));
av
++
;
for
(;
*
av
!=
NULL
;
av
++
)
...
...
@@ -890,6 +890,24 @@ cmd_http_rxbody(CMD_ARGS)
vtc_log
(
hp
->
vl
,
4
,
"bodylen = %s"
,
hp
->
bodylen
);
}
static
void
cmd_http_rxrespbody
(
CMD_ARGS
)
{
struct
http
*
hp
;
(
void
)
cmd
;
(
void
)
vl
;
CAST_OBJ_NOTNULL
(
hp
,
priv
,
HTTP_MAGIC
);
ONLY_CLIENT
(
hp
,
av
);
AZ
(
strcmp
(
av
[
0
],
"rxrespbody"
));
av
++
;
for
(;
*
av
!=
NULL
;
av
++
)
vtc_log
(
hp
->
vl
,
0
,
"Unknown http rxreq spec: %s
\n
"
,
*
av
);
http_swallow_body
(
hp
,
hp
->
resp
,
0
);
vtc_log
(
hp
->
vl
,
4
,
"bodylen = %s"
,
hp
->
bodylen
);
}
static
void
cmd_http_rxchunk
(
CMD_ARGS
)
{
...
...
@@ -1224,12 +1242,13 @@ static const struct cmds http_cmds[] = {
{
"rxreq"
,
cmd_http_rxreq
},
{
"rxreqhdrs"
,
cmd_http_rxreqhdrs
},
{
"rxreqbody"
,
cmd_http_rxreqbody
},
{
"rxchunk"
,
cmd_http_rxchunk
},
{
"rxbody"
,
cmd_http_rxbody
},
{
"txresp"
,
cmd_http_txresp
},
{
"rxresp"
,
cmd_http_rxresp
},
{
"rxresphdrs"
,
cmd_http_rxresphdrs
},
{
"rxrespbody"
,
cmd_http_rxrespbody
},
{
"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