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
deb3ef10
Commit
deb3ef10
authored
Oct 30, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a couple of bugs for the detached rx*body functions.
parent
abefe72e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
vtc_http.c
bin/varnishtest/vtc_http.c
+1
-4
No files found.
bin/varnishtest/vtc_http.c
View file @
deb3ef10
...
...
@@ -465,10 +465,10 @@ http_swallow_body(struct http *hp, char * const *hh, int body)
char
*
p
;
int
i
,
l
,
ll
;
hp
->
body
=
hp
->
rxbuf
+
hp
->
prxbuf
;
ll
=
0
;
p
=
http_find_header
(
hh
,
"content-length"
);
if
(
p
!=
NULL
)
{
hp
->
body
=
hp
->
rxbuf
+
hp
->
prxbuf
;
l
=
strtoul
(
p
,
NULL
,
10
);
(
void
)
http_rxchar
(
hp
,
l
,
0
);
vtc_dump
(
hp
->
vl
,
4
,
"body"
,
hp
->
body
,
l
);
...
...
@@ -487,7 +487,6 @@ http_swallow_body(struct http *hp, char * const *hh, int body)
return
;
}
if
(
body
)
{
hp
->
body
=
hp
->
rxbuf
+
hp
->
prxbuf
;
do
{
i
=
http_rxchar
(
hp
,
1
,
1
);
ll
+=
i
;
...
...
@@ -558,7 +557,6 @@ cmd_http_rxresp(CMD_ARGS)
if
(
http_count_header
(
hp
->
resp
,
"Content-Length"
)
>
1
)
vtc_log
(
hp
->
vl
,
0
,
"Multiple Content-Length headers.
\n
"
);
hp
->
body
=
hp
->
rxbuf
+
hp
->
prxbuf
;
if
(
!
has_obj
)
return
;
else
if
(
!
strcmp
(
hp
->
resp
[
1
],
"200"
))
...
...
@@ -848,7 +846,6 @@ cmd_http_rxreq(CMD_ARGS)
if
(
http_count_header
(
hp
->
req
,
"Content-Length"
)
>
1
)
vtc_log
(
hp
->
vl
,
0
,
"Multiple Content-Length headers.
\n
"
);
hp
->
body
=
hp
->
rxbuf
+
hp
->
prxbuf
;
http_swallow_body
(
hp
,
hp
->
req
,
0
);
vtc_log
(
hp
->
vl
,
4
,
"bodylen = %s"
,
hp
->
bodylen
);
}
...
...
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