1--TEST-- 2Bug #78719 (http wrapper silently ignores long Location headers) 3--SKIPIF-- 4<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?> 5--INI-- 6allow_url_fopen=1 7--FILE-- 8<?php 9require 'server.inc'; 10 11$url = str_repeat('*', 2000); 12$responses = array( 13 "data://text/plain,HTTP/1.0 302 Ok\r\nLocation: $url\r\n\r\nBody", 14); 15$pid = http_server("tcp://127.0.0.1:12342", $responses, $output); 16 17$context = stream_context_create(['http' => ['follow_location' => 0]]); 18$stream = fopen('http://127.0.0.1:12342/', 'r', false, $context); 19var_dump(stream_get_contents($stream)); 20var_dump(stream_get_meta_data($stream)['wrapper_data'][1] === "Location: $url"); 21 22http_server_kill($pid); 23?> 24--EXPECTF-- 25string(4) "Body" 26bool(true) 27