Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43777 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92795 invoked from network); 26 Apr 2009 12:06:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Apr 2009 12:06:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=php-php-dev@m.gmane.org; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=news@ger.gmane.org; sender-id=pass Received-SPF: pass (pb1.pair.com: domain m.gmane.org designates 80.91.229.2 as permitted sender) X-PHP-List-Original-Sender: php-php-dev@m.gmane.org X-Host-Fingerprint: 80.91.229.2 main.gmane.org Linux 2.5 (sometimes 2.4) (4) Received: from [80.91.229.2] ([80.91.229.2:46817] helo=ciao.gmane.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/05-61418-62E44F94 for ; Sun, 26 Apr 2009 08:05:59 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Ly37L-0008Aj-HI for internals@lists.php.net; Sun, 26 Apr 2009 12:05:55 +0000 Received: from dslb-084-057-132-210.pools.arcor-ip.net ([84.57.132.210]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 Apr 2009 12:05:55 +0000 Received: from carsten_sttgt by dslb-084-057-132-210.pools.arcor-ip.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 Apr 2009 12:05:55 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: internals@lists.php.net Date: Sun, 26 Apr 2009 14:05:35 +0200 Lines: 63 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: dslb-084-057-132-210.pools.arcor-ip.net User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) Sender: news Subject: question about bug #47759 From: carsten_sttgt@gmx.de (Carsten Wiedmann) 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): | | 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