Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36069 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24415 invoked from network); 10 Mar 2008 00:03:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Mar 2008 00:03:41 -0000 X-Host-Fingerprint: 207.81.73.169 d207-81-73-169.bchsia.telus.net Received: from [207.81.73.169] ([207.81.73.169:12571] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3D/4F-43615-CDA74D74 for ; Sun, 09 Mar 2008 19:03:41 -0500 Message-ID: <3D.4F.43615.CDA74D74@pb1.pair.com> To: internals@lists.php.net Date: Sun, 09 Mar 2008 17:03:38 -0700 User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 207.81.73.169 Subject: Suggestion for get_headers From: frozenfire@thefrozenfire.com (Justin Martin) Hi there, I have a suggestion regarding get_headers, however I do not have a knowledge of C with which to provide a patch. The function get_headers is, as most will know, used to retrieve headers generated by an HTTP request. The primary parameter to this, "string $url", is provided unencoded. Due to this, any request with special characters (i.e. a space), will return 400 BAD REQUEST. My suggestion to remedy this, would be to internally apply the function "urlencode" to the $url parameter. This would automatically encode any provided URL, while remaining transparent. Any comments? Thanks, Justin Martin