1--TEST-- 2Bug #79265 variation: "host:" not at start of header 3--INI-- 4allow_url_fopen=1 5--SKIPIF-- 6<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?> 7--FILE-- 8<?php 9require 'server.inc'; 10 11$responses = array( 12 "data://text/plain,HTTP/1.0 200 OK\r\n\r\n", 13); 14 15$pid = http_server("tcp://127.0.0.1:12342", $responses, $output); 16 17$opts = array( 18 'http'=>array( 19 'method'=>"GET", 20 'header'=>"RandomHeader: host:8080\r\n" . 21 "Cookie: foo=bar\r\n" 22 ) 23); 24$context = stream_context_create($opts); 25$fd = fopen('http://127.0.0.1:12342/', 'rb', false, $context); 26fseek($output, 0, SEEK_SET); 27echo stream_get_contents($output); 28fclose($fd); 29 30http_server_kill($pid); 31 32?> 33--EXPECT-- 34GET / HTTP/1.0 35Host: 127.0.0.1:12342 36Connection: close 37RandomHeader: host:8080 38Cookie: foo=bar 39