]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.3' into PHP-7.4
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 17 Sep 2019 13:43:35 +0000 (15:43 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 17 Sep 2019 13:43:35 +0000 (15:43 +0200)
1  2 
ext/standard/http_fopen_wrapper.c

index 478132fd4036e562a2ad56a1329f6194965121fb,0aeec9115b1f91b374d8284aa818e49bd0162943..9632bd344ebcc099c837b4681983123b6e8027ec
@@@ -726,9 -727,14 +726,11 @@@ finish
                        ZVAL_STRINGL(&http_response, tmp_line, tmp_line_len);
                        zend_hash_next_index_insert(Z_ARRVAL_P(response_header), &http_response);
                } else {
-                       php_stream_wrapper_log_error(wrapper, options, "HTTP request failed, unexpected end of socket!");
+                       php_stream_close(stream);
+                       stream = NULL;
+                       php_stream_wrapper_log_error(wrapper, options, "HTTP request failed!");
                        goto out;
                }
 -      } else {
 -              php_stream_wrapper_log_error(wrapper, options, "HTTP request failed, unexpected end of socket!");
 -              goto out;
        }
  
        /* read past HTTP headers */