Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62952 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80193 invoked from network); 12 Sep 2012 08:55:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Sep 2012 08:55:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=ivan.enderlin@hoa-project.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ivan.enderlin@hoa-project.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain hoa-project.net from 95.130.12.24 cause and error) X-PHP-List-Original-Sender: ivan.enderlin@hoa-project.net X-Host-Fingerprint: 95.130.12.24 host1.trois-doubles.net Linux 2.6 Received: from [95.130.12.24] ([95.130.12.24:55728] helo=host1.trois-doubles.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9B/D5-42492-1ED40505 for ; Wed, 12 Sep 2012 04:54:58 -0400 Received: from [192.168.101.112] (static-qvn-qvo-229253.business.bouyguestelecom.com [89.91.229.253]) by host1.trois-doubles.net (Postfix) with ESMTPA id 3CB792059FF for ; Wed, 12 Sep 2012 10:54:53 +0200 (CEST) Message-ID: <50504DDD.6070001@hoa-project.net> Date: Wed, 12 Sep 2012 10:54:53 +0200 Reply-To: ivan.enderlin@hoa-project.net User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/17.0 Thunderbird/17.0a2 MIME-Version: 1.0 To: internals Content-Type: multipart/alternative; boundary="------------000509060308060602010202" Subject: PHP build-in HTTP server and the HEAD method From: ivan.enderlin@hoa-project.net ("Ivan Enderlin @ Hoa") --------------000509060308060602010202 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hello, It is probably me but it seems like the build-in HTTP server does not well support the HEAD method. Here is my following test case. First, the foo.php file: /dev/null 2>&1 & $ # Test with POST. $ curl -v -X POST 127.0.0.1:8888 * About to connect() to 127.0.0.1 port 8888 (#0) * Trying 127.0.0.1... * connected * Connected to 127.0.0.1 (127.0.0.1) port 8888 (#0) > POST / HTTP/1.1 > User-Agent: curl/7.24.0 (...) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5 > Host: 127.0.0.1:8888 > Accept: */* > < HTTP/1.1 200 OK < Host: 127.0.0.1:8888 < Connection: close < X-Powered-By: PHP/5.5.0-dev < Content-type: text/html < string(4) "POST" * Closing connection #0 $ # It works, cool. $ # Now, test with HEAD. $ curl -v -X HEAD 127.0.0.1:8888 * About to connect() to 127.0.0.1 port 8888 (#0) * Trying 127.0.0.1... * connected * Connected to 127.0.0.1 (127.0.0.1) port 8888 (#0) > HEAD / HTTP/1.1 > User-Agent: curl/7.24.0 (...) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5 > Host: 127.0.0.1:8888 > Accept: */* > < HTTP/1.1 200 OK < Host: 127.0.0.1:8888 < Connection: close < X-Powered-By: PHP/5.5.0-dev < Content-type: text/html < * Closing connection #0 I have to admit that I don't understand, even by looking at the source code. Thoughts? Thanks. -- Ivan Enderlin Developer of Hoa http://hoa.42/ or http://hoa-project.net/ PhD. student at DISC/Femto-ST (Vesontio) and INRIA (Cassis) http://disc.univ-fcomte.fr/ and http://www.inria.fr/ Member of HTML and WebApps Working Group of W3C http://w3.org/ --------------000509060308060602010202--