This is a code review request for a late fix for JDK 12, to address a potentially serious regression.
Post 8213189 [1] the HTTP Client now adds both the `:authority:` pseudo-header and the `Host` header to outbound HTTP/2 requests. The HTTP/2 RFC does not seem to rule out this behavior, but it does recommend that the pseudo-header be used *instead* of the `Host` header. I'm not quite sure why the Goog server rejects such a request ( with both headers ). Other HTTP/2 servers that I have checked do not. While the behaviour of the Goog server is questionable, the fact remains that the HTTP Client cannot successfully interact with it over HTTP/2. The behaviour of the client, post 8213189, has deviated away from what is recommended by the RFC. On balance, it seems safest to just revert the small part of the change for 8213189 that caused this issue. The small part is not even all that relevant to the crux of the fix for 8213189. Bug: https://bugs.openjdk.java.net/browse/JDK-8218546 Webrev: https://cr.openjdk.java.net/~chegar/8218546/webrev.00/ -Chris. [1] https://bugs.openjdk.java.net/browse/JDK-8213189