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(); ?> 7--FILE-- 8<?php 9require 'server.inc'; 10 11$responses = array( 12 "data://text/plain,HTTP/1.1 200 OK\r\n\r\n", 13); 14 15['pid' => $pid, 'uri' => $uri] = http_server($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($uri, 'rb', false, $context); 26fseek($output, 0, SEEK_SET); 27echo stream_get_contents($output); 28fclose($fd); 29 30http_server_kill($pid); 31 32?> 33--EXPECTF-- 34GET / HTTP/1.1 35Host: %s:%d 36Connection: close 37RandomHeader: host:8080 38Cookie: foo=bar 39