m6w6 / ext-http

Extended HTTP Support
BSD 2-Clause "Simplified" License
79 stars 22 forks source link

tests/info002.phpt fails with PHP 7.4.0 #102

Closed Whissi closed 4 years ago

Whissi commented 4 years ago
---- EXPECTED OUTPUT
Test
http\Exception\BadMessageException: http\Message::__construct(): Failed to parse headers: unexpected character '\057' at pos 4 of 'HTTP/1.1 99 Apples in my Basket' in %sinfo002.php:%d
Stack trace:
#0 %sinfo002.php(%d): http\Message->__construct('HTTP/1.1 99 App...')
#1 %sinfo002.php(%d): {closure}()
#2 %sinfo002.php(%d): trap(Object(Closure))
#3 {main}
http\Exception\BadMessageException: http\Message::__construct(): Failed to parse headers: unexpected character '\040' at pos 7 of 'CONNECT HTTP/1.1' in %sinfo002.php:%d
Stack trace:
#0 %sinfo002.php(%d): http\Message->__construct('CONNECT HTTP/1....')
#1 %sinfo002.php(%d): {closure}()
#2 %sinfo002.php(%d): trap(Object(Closure))
#3 {main}
HTTP/1.1 200
CONNECT www.example.org:80 HTTP/1.1
===DONE===
---- ACTUAL OUTPUT
Test
http\Exception\BadMessageException: http\Message::__construct(): Failed to parse headers: unexpected character '\057' at pos 4 of 'HTTP/1.1 99 Apples in my Basket' in /var/tmp/portage/dev-php/pecl-http-3.2.3/work/php7.4/tests/info002.php:14
Stack trace:
#0 /var/tmp/portage/dev-php/pecl-http-3.2.3/work/php7.4/tests/info002.php(14): http\Message->__construct()
#1 /var/tmp/portage/dev-php/pecl-http-3.2.3/work/php7.4/tests/info002.php(7): {closure}()
#2 /var/tmp/portage/dev-php/pecl-http-3.2.3/work/php7.4/tests/info002.php(15): trap()
#3 {main}
http\Exception\BadMessageException: http\Message::__construct(): Failed to parse headers: unexpected character '\040' at pos 7 of 'CONNECT HTTP/1.1' in /var/tmp/portage/dev-php/pecl-http-3.2.3/work/php7.4/tests/info002.php:18
Stack trace:
#0 /var/tmp/portage/dev-php/pecl-http-3.2.3/work/php7.4/tests/info002.php(18): http\Message->__construct()
#1 /var/tmp/portage/dev-php/pecl-http-3.2.3/work/php7.4/tests/info002.php(7): {closure}()
#2 /var/tmp/portage/dev-php/pecl-http-3.2.3/work/php7.4/tests/info002.php(19): trap()
#3 {main}
HTTP/1.1 200
CONNECT www.example.org:80 HTTP/1.1
===DONE===
---- FAILED
m6w6 commented 4 years ago

Thank you for this report. Unfortunately you did not provide enough information to handle this bug, while the tests succeed on travis-ci: https://travis-ci.org/m6w6/ext-http/jobs/618250434

Whissi commented 4 years ago

This test depends on zend.exception_ignore_args = Off whereas I was testing with zend.exception_ignore_args = On. Could you please adjust test suite to enforce correct setting?