Commit 88599228 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Prefer spdy/3 to spdy/2 in spdylay_select_next_protocol()

parent 5c187b95
......@@ -38,8 +38,8 @@ int spdylay_select_next_protocol(unsigned char **out, unsigned char *outlen,
int http_selected = 0;
unsigned int i = 0;
static const spdylay_npn_proto proto_list[] = {
{ (const unsigned char*)"spdy/2", 6, SPDYLAY_PROTO_SPDY2 },
{ (const unsigned char*)"spdy/3", 6, SPDYLAY_PROTO_SPDY3 }
{ (const unsigned char*)"spdy/3", 6, SPDYLAY_PROTO_SPDY3 },
{ (const unsigned char*)"spdy/2", 6, SPDYLAY_PROTO_SPDY2 }
};
for(; i < inlen; i += in[i]+1) {
unsigned int j;
......@@ -55,7 +55,7 @@ int spdylay_select_next_protocol(unsigned char **out, unsigned char *outlen,
http_selected = 1;
*out = (unsigned char*)&in[i+1];
*outlen = in[i];
/* Go through to the next iteration, because "spdy/2" may be
/* Go through to the next iteration, because "spdy/X" may be
there */
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment