Disabling HTTP/2 / SPDY in HTTP.SYS and IIS in Windows 10

巧了我就是萌 提交于 2019-11-27 02:15:53

问题


When testing on Windows 10 we were seeing lots of browser incompatibilities that I hadn't seen before with earlier Windows versions. Some browsers would work, but others would report ERR_SPDY_PROTOCOL_ERROR. My quick search for this problem showed I was not alone.

My app uses WWSAPI and HTTP.SYS with HTTPS (TLS). Does anyone know how to disable SPDY / HTTP/2 in WWSAPI (which is using HTTP.SYS) on Windows 10?

I'd also love to get a full up-to-date Windows 10 list of registry settings for HTTP.SYS.

See below for my answer to this. Hope this helps others too.

Mark


回答1:


EDIT: disabling HTTP/2 will significantly slow down the speed of your website, this is not a permanent solution. The problem turned out to be caused by our webapp sending a wrong authentication header to the server.

To still disable HTTP/2, see below.

(OP gave a helpful answer, but in the question. I moved the answer):

I did work around my HTTP/2 problem by configuring Windows 10 HTTP.SYS in the registry to disable HTTP/2. Given that I didn't find info anywhere, I thought I'd share my solution to that problem here too. I would like to find a way of doing this through WWSAPI though.

If I turned off SPDY support in the client browser, it would work but I wanted to turn this off at the server side (HTTP.SYS on Windows 10) so that it wouldn't negotiate HTTP/2 but would use the older more compatible HTTP(S).

Discovered two new registry settings for HTTP.SYS in:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters

  • EnableHttp2Tls REG_DWORD 0
  • EnableHttp2Cleartext REG_DWORD 0

Adding these values and setting both to 0 in Windows 10 resulted in HTTP/2 / SPDY not being negotiated and my ERR_SPDY_PROTOCOL_ERROR problems went away without requiring browser configuration changes. I'm not suggesting there is anything wrong with Windows 10 HTTP/2, the problems may be with certain browsers.

This may work for IIS too, but I don't use that so I haven't tried and in any case there may be a better way to do this in IIS.

Hope this helps others too.

I can confirm this helps for IIS too, but I had to restart my computer.



来源:https://stackoverflow.com/questions/31718533/disabling-http-2-spdy-in-http-sys-and-iis-in-windows-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!