fix tests
[m6w6/ext-http] / tests / bug71719.phpt
1 --TEST--
2 Bug #71719 (Buffer overflow in HTTP url parsing functions)
3 --SKIPIF--
4 <?php
5 include "skipif.inc";
6 ?>
7 --FILE--
8 <?php
9
10 echo "Test\n";
11 try {
12 echo new http\Message(file_get_contents(__DIR__."/data/bug71719.bin"), false);
13 } catch (Exception $e) {
14 echo $e;
15 }
16 ?>
17
18 ===DONE===
19 --EXPECTF--
20 Test
21 %r(exception ')?%rhttp\Exception\BadMessageException%r(' with message '|: )%rhttp\Message::__construct(): Could not parse HTTP protocol version 'HTTP/%s.0'%r'?%r in %sbug71719.php:5
22 Stack trace:
23 #0 %sbug71719.php(5): http\Message->__construct('%r(\?\?|\\x80\\xAC)%rTd 5 HTTP/1.1...', false)
24 #1 {main}
25 ===DONE===