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
0c5337e2
Commit
0c5337e2
authored
Jul 18, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change the response code on overly long request lines from 400 to 413
as per discussions in httpbis WG
parent
d7c7c39a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
cache_http.c
bin/varnishd/cache_http.c
+3
-3
c00039.vtc
bin/varnishtest/tests/c00039.vtc
+2
-2
No files found.
bin/varnishd/cache_http.c
View file @
0c5337e2
...
@@ -522,7 +522,7 @@ http_dissect_hdrs(struct worker *w, struct http *hp, int fd, char *p,
...
@@ -522,7 +522,7 @@ http_dissect_hdrs(struct worker *w, struct http *hp, int fd, char *p,
if
(
q
-
p
>
htc
->
maxhdr
)
{
if
(
q
-
p
>
htc
->
maxhdr
)
{
VSC_C_main
->
losthdr
++
;
VSC_C_main
->
losthdr
++
;
WSL
(
w
,
SLT_LostHeader
,
fd
,
"%.*s"
,
q
-
p
,
p
);
WSL
(
w
,
SLT_LostHeader
,
fd
,
"%.*s"
,
q
-
p
,
p
);
return
(
4
00
);
return
(
4
13
);
}
}
/* Empty header = end of headers */
/* Empty header = end of headers */
...
@@ -547,7 +547,7 @@ http_dissect_hdrs(struct worker *w, struct http *hp, int fd, char *p,
...
@@ -547,7 +547,7 @@ http_dissect_hdrs(struct worker *w, struct http *hp, int fd, char *p,
}
else
{
}
else
{
VSC_C_main
->
losthdr
++
;
VSC_C_main
->
losthdr
++
;
WSL
(
w
,
SLT_LostHeader
,
fd
,
"%.*s"
,
q
-
p
,
p
);
WSL
(
w
,
SLT_LostHeader
,
fd
,
"%.*s"
,
q
-
p
,
p
);
return
(
4
00
);
return
(
4
13
);
}
}
}
}
return
(
0
);
return
(
0
);
...
@@ -598,7 +598,7 @@ http_splitline(struct worker *w, int fd, struct http *hp,
...
@@ -598,7 +598,7 @@ http_splitline(struct worker *w, int fd, struct http *hp,
hp
->
hd
[
h2
].
e
=
p
;
hp
->
hd
[
h2
].
e
=
p
;
if
(
!
Tlen
(
hp
->
hd
[
h2
]))
if
(
!
Tlen
(
hp
->
hd
[
h2
]))
return
(
4
00
);
return
(
4
13
);
/* Skip SP */
/* Skip SP */
for
(;
vct_issp
(
*
p
);
p
++
)
{
for
(;
vct_issp
(
*
p
);
p
++
)
{
...
...
bin/varnishtest/tests/c00039.vtc
View file @
0c5337e2
...
@@ -23,7 +23,7 @@ client c1 {
...
@@ -23,7 +23,7 @@ client c1 {
expect resp.status == 200
expect resp.status == 200
txreq -url "/1" -hdr "1...5....0....5....0....5....0....5....0."
txreq -url "/1" -hdr "1...5....0....5....0....5....0....5....0."
rxresp
rxresp
expect resp.status == 4
00
expect resp.status == 4
13
} -run
} -run
client c1 {
client c1 {
...
@@ -32,7 +32,7 @@ client c1 {
...
@@ -32,7 +32,7 @@ client c1 {
expect resp.status == 200
expect resp.status == 200
txreq -url "/2" -hdr "1...5....0....5\n ..0....5....0....5....0."
txreq -url "/2" -hdr "1...5....0....5\n ..0....5....0....5....0."
rxresp
rxresp
expect resp.status == 4
00
expect resp.status == 4
13
} -run
} -run
client c1 {
client c1 {
...
...
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