Magento – Magento 2: Invalid response line returned from server: HTTP/2 200

magento2response

Invalid response line returned from server: HTTP/2 200

I get the above error message when I want to log in to the extension manager.

Does anyone know how I can solve this?

Love to hear if someone has a solution for this.

Best Answer

As alternative, you can update regexp in both places:

line 185: replace

if (! preg_match('|^\d\.\d$|', $version)) { with

if (! preg_match('|^\d(\.\d)?$|', $version)) {

line 517: replace

if ($index === 0 && preg_match('#^HTTP/\d+(?:\.\d+) [1-5]\d+#', $line)) { with

if ($index === 0 && preg_match('#^HTTP/\d+(?:\.\d+|) [1-5]\d+#', $line)) {

This should work for both HTTP/1.1 and HTTP/2 response headers

Related Topic