|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: niko dot sams at gmail dot com
New email:
PHP Version: OS:


 [2013-02-27 12:49 UTC] niko dot sams at gmail dot com
weak etags are quoted incorrectly, see test script.

Test script:
$r = new HttpRequest("", 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.""


Add a Patch

Pull Requests

Add a Pull Request


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_METH_GET, array(
    'headers'=> array(
        'If-None-Match' => 'W/"abc"'
$m = $r->send();
echo $r->getRawRequestMessage();
 [2013-03-02 20:13 UTC]
Automatic comment from SVN on behalf of mike
Log: * Fixed Bug #64310 (weak etags W/"abc" are quoted as "W/"abc"")
 [2013-03-02 20:14 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: mike
 [2013-03-02 20:14 UTC]
Fix is in trunk and will be released with 1.7.5

Thank you.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Dec 08 10:01:28 2023 UTC