http - Multiple Protocols - Correct Implementation -


i inspecting of http exchanges between browser , google , triggered question.

in short, browser (firefox 36.0.4) making http/1.1 requests , google responding http/2.0; there no attempt respond in requested protocol. aware of http/2.0 spec has been implemented in haphazard way through spdy, seems poor neogitation client.

i thought purpose of declaring protocols in header server able determine how should respond client, in 1 of 3 ways:

1. client has requested server's preferred protocol, server continues request normal

2. client has requested protocol version server supports, server responds in request protocol includes upgrade header indicating preferred protocol. client may request upgrade @ point server send 101 switching protocols response , switch preferred protocol.

3. client has requested unsupported or outdated protocol, server sends 426 upgrade required response supported protocols (in descending order of preference) in upgrade header; client must repeat request supported protocol.

4. client reuested major protocol version wholly unsupported; e.g. http/2.x while server supports http/1.x. server responds 505 http version not supported

the exchange google not doing this; poor practice or missing something?

an example, selected @ random:

https://plus.google.com/u/0/_/notifications/frame?querystring=blahblahblah  /u/0/_/notifications/frame?querystring=blahblahblah http/1.1 host: plus.google.com user-agent: mozilla/5.0 (windows nt 6.1; wow64; rv:36.0) gecko/20100101 firefox/36.0 accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 accept-language: en-gb,en;q=0.5 accept-encoding: gzip, deflate referer: https://www.google.co.uk/?gfe_rd=cr&ei=lc8bvcxfokbj8we_uikydg&gws_rd=ssl cookie: nid=67=izxcmvtvg-6psqiupz5tspl-7-ujdls3vdci3aflmolcpd5joq0nfzhtnnpccw9ymbxsn3grgxfsgylxgek9xmnbune0lcpruc_ahhpc5wv6n-gz8f7s-js-jwgzwewri-gawxk1vgyrw7jmbqeiausrczs1fr1k6zuih0epjdlwzd-k26mjnazpyhl_vz5k4m8nrtfdkaoypw; otz=2759671_52_56_123900_52_436380; sid=dqaaap0aaaaqkggz5afnesd464z_jusmti7jqfeksuwkgzvje8qvdboptzpl5znjkssssg9qvjglp-amnlrgn2b7msdf_4z7ebe1x347cd3-j3ktledgmq9nro92hxeseqf974vnumrst-xqmj9oq_xf-kdz-cdej1xiqwzyvhurv-irxib5ei7x9dqllf2nspylacxlrwkdjcqx-fddb03fweue7dimys3bq-_nu5fg9os6i6r6aby9mkiy84rrazfvthd38vjf5z2wymgq55qjpr9edpsa5vkh1tbw6xyljzlt5eeej1xoqrf4egurkioig8iiqrs49gnwqqscptw3row-jndi; hsid=a7u8vyqi-v7jjsebs; ssid=aoojy4hdlygnsjurk; apisid=z23kh1a0vsbukvmu/araoeoni08hfbgg6r; sapisid=5itgyxkdrpp7fntf/adifbknyn04h7n6cu; pref=id=cc54787f58f50d42:u=8e10581450dbe3b5:ff=0:ld=en:tm=1416091562:lm=1418086819:gm=1:s=0kvfl2hqkg8psvwv; ogp=-5061451:-5061492:; ogpc=4061155-1: connection: keep-alive  http/2.0 200 ok alternate-protocol: 443:quic,p=0.5 cache-control: private, max-age=0 content-security-policy-report-only: script-src 'unsafe-inline' 'unsafe-eval' 'self' https://*.googleapis.com https://*.gstatic.com https://apis.google.com https://www.google-analytics.com https://www.googletagmanager.com https://*.talkgadget.google.com https://pagead2.googleadservices.com https://pagead2.googlesyndication.com https://tpc.googlesyndication.com https://s.ytimg.com https://www.youtube.com https://clients1.google.com https://www.google.com;report-uri /_/cspreport/es_oz_20150330.18_p0 content-type: text/html; charset=utf-8 date: wed, 01 apr 2015 10:57:55 gmt expires: wed, 01 apr 2015 10:57:55 gmt server: gse x-content-type-options: nosniff x-ua-compatible: ie=edge, chrome=1 x-xss-protection: 1; mode=block x-firefox-spdy: h2-15 

this https request. client announced support http/2.0 alpn (formerly npn) extension in ssl handshake. therefore server knows client can http/2.0. if extension not given server not allowed reply higher major http version compared client request.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -