2

Background

In a version of Safari that supports HTTP/2 (i.e. v9+) running on macOS “El Capitan” v10.11 or newer, when accessing a webpage served from IIS10 via HTTP/2 (e.g. Windows Server 2016 / Windows 10), if the page contains a "Response.Flush" then it will not load. It simply hangs with a white screen. Web server CPU usage also spikes during these occurrences.

This thread suggests that when Response.Flush is used, IIS switches protocol from HTTP/2 back to HTTP/1.1. Safari cannot handle this, whilst all other browsers seemingly can.

Demos from the link above:

Working - http://limoeventplanner.com/safari-test.asp

Not working - https://limoeventplanner.com/safari-test.asp

I appreciate that the solution to this problem may lie elsewhere (I currently have a bug open with webkit), so I will try to make my questions focused...

TL;DR

  1. Does using Response.Flush still make sense in a HTTP/2 environment?

  2. Is the "downgrade" to HTTP/1.1 by IIS the expected behaviour in this scenario? If so, why?

Brett Postin
  • 11,215
  • 10
  • 60
  • 95
  • I accessed both working and non working url from chrome 57.0.2987.110 to test the behavior,i got http 1.1 for both ? – Rohith Jun 23 '17 at 14:12
  • As explained above, when using Response.Flush IIS seemingly downgrades to 1.1, so that's to be expected. Safari can't seem to cope with this. – Brett Postin Jun 23 '17 at 14:22
  • HTTP/2 protocol switching starts with an upgrade header send to the IIS server and IIS does not have much control on this as this is handled at the http.sys layer. Since the issue seems to be with Safari,we can do a work around from the server side to avoid the issue I hope. Before the application calling Response.Flush,we can check the browser user agent,OS (**HTTP_USER_AGENT**) and the HTTP version by checking the server variable **SERVER_PROTOCOL** and then avoid the call to Response.Flush – Rohith Jun 23 '17 at 16:49
  • We got exactly the same problem with Firefox. Worse, the response.flush bug happened after a POST request, so we got a double postback, which IMHO should never ever happen. We are disabling HTTP/2 for this application. – Faust Apr 10 '18 at 18:06
  • @LeandroBarone: How did you disabled HTTP/2 for you application? I am getting exactly same issue. – Mayur Lohite Feb 20 '19 at 09:38
  • @BrettPostin : How did you manage to open http://limoeventplanner.com/safari-test.asp page on HTTP 1.1? – Mayur Lohite Feb 20 '19 at 09:44
  • @MayurLohite we disabled HTTP/2 to resolve the issue in the short term. The longer term solution was to refactor calls to Response.Flush. The issue is seemingly resolved in Mac OS High Sierra. – Brett Postin Feb 20 '19 at 13:27
  • @BrettPostin: I would like to know how you disabled HTTP/2 ? – Mayur Lohite Feb 20 '19 at 13:55
  • @MayurLohite Depends on your webserver but for IIS https://stackoverflow.com/a/31714461/295813 – Brett Postin Feb 21 '19 at 09:07
  • @BrettPostin: Thanks! – Mayur Lohite Feb 21 '19 at 09:22

0 Answers0