#50587 [Opn->Bgs]: The missing trailing slash on the url make an request error.

From: Date: Mon, 28 Dec 2009 03:47:57 +0000
Subject: #50587 [Opn->Bgs]: The missing trailing slash on the url make an request error.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-146142@lists.php.net to get a copy of this message
 ID:               50587
 Updated by:       rasmus@php.net
 Reported By:      thundix at web dot de
-Status:           Open
+Status:           Bogus
 Bug Type:         URL related
 Operating System: Windows
 PHP Version:      5.2.12
 New Comment:

If you look at this more carefully, you will see that the server issues

a redirect and as documented httprequest has the redirect option which

sets how many redirects to follow set to 0.  So, this is behaving 
exactly as it was intended and exactly as documented.


Previous Comments:
------------------------------------------------------------------------

[2009-12-28 03:41:03] thundix at web dot de

Description:
------------
Request URL: http://google.de
Response Body:
"The site – www.google.de/test.php – doesn´t exists."

Request URL: http://google.de/
=> It works!

Same problem have andychr17 at hotmail dot com
See note here:
http://de.php.net/manual/de/function.httprequest-construct.php

Reproduce code:
---------------
<?php
//=> Try it with http://www.google.de and someone with
http://www.google.de/

$r = new HttpRequest("http://www.google.de",
                        HTTP_METH_GET,
                        array('timeout' => 5,
                            'useragent' => 'Mozilla/5.0 (Windows; U;
Windows NT 6.0; de; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6',
                            'redirect' => 3) 
                    );

//Send request
$r->send();
//Only for showing you the result
echo $r->getResponseBody();
?>

Expected result:
----------------
=> See Description for more information

Actual result:
--------------
=> See Description for more information


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50587&edit=1



Thread (8 messages)

« previous php.bugs (#146142) next »