Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003319 [Quercus] minor always 02-04-09 16:23 02-04-09 19:55
Reporter koreth View Status public  
Assigned To nam
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0003319: stream_context_create / fopen doesn't send multiple header lines
Description The fix for bug 3317 addressed the mangling of the Content-Type: line but the header is still wrong. The test script again:

$server_addr = ''; [^]
$user_agent = 'test client';
$content = 'abcdefg';
$content_length = strlen($content);
$context = array('http' =>
                   array('method' => 'POST',
                         'user_agent' => $user_agent,
                         'header' => "Content-Type: text/plain\r\n" .
                                     "Content-Length: $content_length",
                         'content' => $content));
$context_id = stream_context_create($context);
$sock = fopen($server_addr, 'r', false, $context_id);

PHP sends the following header:

Content-Type: text/plain
Content-Length: 7
User-Agent: test client

Quercus now sends:

User-Agent: test client
content-type: text/plain

Note the Content-Length line is missing. Also, there is an extra space before the content type (probably not as important since I think the RFCs say whitespace is supposed to be ignored there) and the header field name is folded to lower case (not supposed to be significant and I don't think it matters for our specific use case, but maybe some web server might care.)
Additional Information
Attached Files

- Relationships

- Notes
02-04-09 19:55


fixed whitespace
fixed Content-Length

Header names are case insensitive as per rfc2616-sec4. However, we may want to fix it for compatibility.

- Issue History
Date Modified Username Field Change
02-04-09 16:23 koreth New Issue
02-04-09 19:10 nam Status new => assigned
02-04-09 19:10 nam Assigned To  => nam
02-04-09 19:55 nam Status assigned => closed
02-04-09 19:55 nam Note Added: 0003804
02-04-09 19:55 nam Resolution open => fixed
02-04-09 19:55 nam Fixed in Version  => 4.0.0

Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker