php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56635 Transferred a partial file
Submitted: 2005-11-10 09:19 UTC Modified: 2007-02-15 09:38 UTC
From: uros at vizija dot si Assigned: mike (profile)
Status: Closed Package: pecl_http (PECL)
PHP Version: 5.0.3 OS: FreeBSD
Private report: No CVE-ID: None
 [2005-11-10 09:19 UTC] uros at vizija dot si
Description:
------------
Some URL reproduce error "transfer partial file". The most obvious problem is because almost all urls are in null frame (check the source of URL http://gwen.evenera.com/

Reproduce code:
---------------
#!/usr/local/bin/php
<?php

$url = 'http://gwen.evenera.com/';
$r = new HttpRequest();
$r->setUrl($url);
try {
    $r->send();
} catch (Exception $e) {
    print_r($e);
}

echo $r->getResponseCode();

?>

Expected result:
----------------
200

Actual result:
--------------
HttpRequestException Object
(
    [message:protected] => Could not perform request: Transferred a partial file
    [string:private] =>
    [code:protected] => 8
    [file:protected] => /usr/local/www/data-dist/slowwwenia.com/periodic/tt.php
    [line:protected] => 8
    [trace:private] => Array
        (
            [0] => Array
                (
                    [file] => /usr/local/www/data-dist/slowwwenia.com/periodic/tt.php
                    [line] => 8
                    [function] => send
                    [class] => HttpRequest
                    [type] => ->
                    [args] => Array
                        (
                        )

                )

        )

)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-10 10:59 UTC] mike@php.net
This has *partially* been fixed in CVS.

- The server returns an invalid response, because the
  message is not terminated by 0 as required for chunked
  encoded messages (the reason for the exception).

- The encountered exception will be thrown in future, too.

- The gathered response data is available through the
  HttpRequest::getResponse*() methods, though.

Thanks a lot, and check out the CVS version if you can.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC