tatsuhiro-t/nghttp2 — pull request #18 by dweekly (2013-12-31 00:16:36+00:00)
Title: More useful warning on NPN negotiation failure due to draft version mism...

I was surprised to see that nghttp2 rejected Twitter's NPN:

$ ./src/nghttp https://twitter.com/ -v
[ 0.098] NPN select next protocol: the remote server offers:
* HTTP-draft-06/2.0
* spdy/3.1
* spdy/3
* http/1.1
Server did not advertise HTTP/2.0 protocol.

After reviewing the code, I saw this was due to Twitter advertising draft-06 and nghttp2 strictly only supporting draft-09. A more helpful error message would have made this clearer. Diff attached.