Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003587 [Quercus] major always 06-29-09 09:34 08-27-09 11:40
Reporter tomi_m View Status public  
Assigned To nam
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 4.0.2 Product Version 4.0.0
  Product Build
Summary 0003587: NumberFormatException when calling $result = file_get_contents($url);
Description When trying to call file_get_contents($data); in PHP script where $data is url I get NumberFormatException. I have found bug in class method com.caucho.vfs.HttpStream.parseHeaders() when calling parseInt in line 814 trying to get http response content-length value.
Parameter passed to parseInt should be trimmed.


Original source
if (key.matchesIgnoreCase("content-length")) {
        _contentLength = Integer.parseInt(value);
      }

After modifying
if (key.matchesIgnoreCase("content-length")) {
        _contentLength = Integer.parseInt(value.trim());
      }
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0004182)
nam
08-27-09 11:40

php/164v
 

- Issue History
Date Modified Username Field Change
06-29-09 09:34 tomi_m New Issue
08-27-09 11:40 nam Status new => assigned
08-27-09 11:40 nam Assigned To  => nam
08-27-09 11:40 nam Status assigned => closed
08-27-09 11:40 nam Note Added: 0004182
08-27-09 11:40 nam Resolution open => fixed
08-27-09 11:40 nam Fixed in Version  => 4.0.2


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