php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64310 weak etags (W/"abc") are quoted as "W/"abc""
Submitted: 2013-02-27 12:49 UTC Modified: 2013-03-02 20:14 UTC
From: niko dot sams at gmail dot com Assigned: mike (profile)
Status: Closed Package: pecl_http (PECL)
PHP Version: 5.4.12 OS:
Private report: No CVE-ID: None
 [2013-02-27 12:49 UTC] niko dot sams at gmail dot com
Description:
------------
weak etags are quoted incorrectly, see test script.

Test script:
---------------
$r = new HttpRequest("http://www.php.net/", HTTP_METH_GET, array(
    'etag' => 'W/"abc"',
));
$m = $r->send();
echo $r->getRawRequestMessage();

Expected result:
----------------
If-None-Match: W/"Dk8DRH48fil7ImA9WhBSGUs."

Actual result:
--------------
If-None-Match: "W/"Dk8DRH48fil7ImA9WhBSGUs.""

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-02-27 12:50 UTC] niko dot sams at gmail dot com
Possible workaround; set header manually:
$r = new HttpRequest("http://www.php.net/", HTTP_METH_GET, array(
    'headers'=> array(
        'If-None-Match' => 'W/"abc"'
    )
));
$m = $r->send();
echo $r->getRawRequestMessage();
 [2013-03-02 20:13 UTC] mike@php.net
Automatic comment from SVN on behalf of mike
Revision: http://svn.php.net/viewvc/?view=revision&revision=329618
Log: * Fixed Bug #64310 (weak etags W/"abc" are quoted as "W/"abc"")
 [2013-03-02 20:14 UTC] mike@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: mike
 [2013-03-02 20:14 UTC] mike@php.net
Fix is in trunk and will be released with 1.7.5

Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 02:01:28 2024 UTC