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
77cab367
Commit
77cab367
authored
Feb 16, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start hammering away on H2 again
parent
a6696fc0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
5 deletions
+20
-5
cache_http2_proto.c
bin/varnishd/http2/cache_http2_proto.c
+18
-3
t02000.vtc
bin/varnishtest/tests/t02000.vtc
+2
-2
No files found.
bin/varnishd/http2/cache_http2_proto.c
View file @
77cab367
...
@@ -400,7 +400,6 @@ h2_rx_headers(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
...
@@ -400,7 +400,6 @@ h2_rx_headers(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
* read frames and proper error handling.
* read frames and proper error handling.
*/
*/
xxxassert
(
h2
->
rxf_stream
&
1
);
xxxassert
(
r2
->
state
==
H2_S_IDLE
);
xxxassert
(
r2
->
state
==
H2_S_IDLE
);
r2
->
state
=
H2_S_OPEN
;
r2
->
state
=
H2_S_OPEN
;
...
@@ -429,7 +428,11 @@ h2_rx_headers(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
...
@@ -429,7 +428,11 @@ h2_rx_headers(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
/* XXX: Error handling */
/* XXX: Error handling */
p
=
h2
->
rxf_data
;
p
=
h2
->
rxf_data
;
l
=
h2
->
rxf_len
;
l
=
h2
->
rxf_len
;
if
(
h2
->
rxf_flags
&
0x20
)
{
if
(
h2
->
rxf_flags
&
H2FF_HEADERS_PADDED
)
{
l
-=
1
+
*
p
;
p
+=
1
;
}
if
(
h2
->
rxf_flags
&
H2FF_HEADERS_PRIORITY
)
{
p
+=
5
;
p
+=
5
;
l
-=
5
;
l
-=
5
;
}
}
...
@@ -518,6 +521,15 @@ h2_rxframe(struct worker *wrk, struct h2_sess *h2)
...
@@ -518,6 +521,15 @@ h2_rxframe(struct worker *wrk, struct h2_sess *h2)
h2_vsl_frame
(
h2
,
h2
->
htc
->
rxbuf_b
,
9L
+
h2
->
rxf_len
);
h2_vsl_frame
(
h2
,
h2
->
htc
->
rxbuf_b
,
9L
+
h2
->
rxf_len
);
if
(
h2
->
rxf_stream
!=
0
&&
!
(
h2
->
rxf_stream
&
1
))
{
/* We don't do push, so all streams must be zero or odd# */
Lck_Lock
(
&
h2
->
sess
->
mtx
);
VSLb
(
h2
->
vsl
,
SLT_Debug
,
"H2: illegal stream (=%u)"
,
h2
->
rxf_stream
);
Lck_Unlock
(
&
h2
->
sess
->
mtx
);
return
(
0
);
}
Lck_Lock
(
&
h2
->
sess
->
mtx
);
Lck_Lock
(
&
h2
->
sess
->
mtx
);
VTAILQ_FOREACH
(
r2
,
&
h2
->
streams
,
list
)
VTAILQ_FOREACH
(
r2
,
&
h2
->
streams
,
list
)
if
(
r2
->
stream
==
h2
->
rxf_stream
)
if
(
r2
->
stream
==
h2
->
rxf_stream
)
...
@@ -544,7 +556,10 @@ h2_rxframe(struct worker *wrk, struct h2_sess *h2)
...
@@ -544,7 +556,10 @@ h2_rxframe(struct worker *wrk, struct h2_sess *h2)
break;
break;
#include "tbl/h2_frames.h"
#include "tbl/h2_frames.h"
default
:
default
:
INCOMPL
();
VSLb
(
h2
->
vsl
,
SLT_Debug
,
"H2: Bad frame type 0x%02x on "
,
h2
->
htc
->
rxbuf_b
[
3
]);
Lck_Unlock
(
&
h2
->
sess
->
mtx
);
return
(
0
);
}
}
Lck_Unlock
(
&
h2
->
sess
->
mtx
);
Lck_Unlock
(
&
h2
->
sess
->
mtx
);
return
(
1
);
return
(
1
);
...
...
bin/varnishtest/tests/t02000.vtc
View file @
77cab367
...
@@ -13,7 +13,7 @@ varnish v1 -cliok "param.set debug +syncvsl"
...
@@ -13,7 +13,7 @@ varnish v1 -cliok "param.set debug +syncvsl"
client c1 {
client c1 {
stream 1 {
stream 1 {
txprio -weight 10 -stream 0
txprio -weight 10 -stream 0
} -run
} -run
stream 3 {
stream 3 {
txprio -weight 10 -stream 0
txprio -weight 10 -stream 0
...
@@ -22,7 +22,7 @@ client c1 {
...
@@ -22,7 +22,7 @@ client c1 {
txprio -weight 10 -stream 2
txprio -weight 10 -stream 2
} -run
} -run
stream 7 {
stream 7 {
txreq -hdr :authority foo.bar
txreq -hdr :authority foo.bar
-pad cotton
rxresp
rxresp
expect resp.status == 200
expect resp.status == 200
} -start
} -start
...
...
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