Hallo all,

please can someone of the devs enlighten me (and others), why #47759 [1] is
not a bug (bogus)?

But just follow me through the manual:
a) at file_get_contents [2] I can read:
| context
| A valid context resource created
| with stream_context_create().

b) at the context main page [3] I can read:
| PHP offers various context options and
| parameters which can be used with all
| filesystem and stream wrappers.

c) now I'm going to the HTTP context options [4] and can read:
| protocol_version  float
| HTTP protocol version.

Well, 1.1 is a valid HTTP protocol version and I must assume, that this is a
valid option for the HTTP context, and the HTTP stream wrapper is using this.

Now a simple testscript (PHP version 5.2.9):
| <?php
| error_reporting(E_ALL);
| if (isset($_GET['getinfo'])) {
|     phpinfo();
|     exit;
| }
|
| $opts = array('http' =>
|     array(
|         'protocol_version' => 1.1,
|         'header'           => 'Connection: close',
|     )
| );
| $context  = stream_context_create($opts);
| $result = file_get_contents(
|     'http://localhost'.$_SERVER['PHP_SELF'].'?getinfo',
|     false, $context
| );
| echo $result;
| ?>

As you can see, this does not work as aspected, because something does not
understand the HTTP/1.1 protocol.

So:
- Why does this not work (why is somthing not using HTTP/1.1)?

- Or if "protocol_version = 1.1" is not valid for this
  wrapper/function (why?), why is there no NOTICE/WARNING/ERROR?

In both cases there is IMHO a bug.

Regards,
Carsten

[1] http://bugs.php.net/bug.php?id=47759
[2] http://de.php.net/manual/en/function.file-get-contents.php
[3] http://de.php.net/manual/en/context.php
[4] http://de.php.net/manual/en/context.http.php


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to