php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60374 Cannot post Array in fetch method
Submitted: 2011-11-24 20:36 UTC Modified: -
Votes:4
Avg. Score:3.5 ± 1.7
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:1 (33.3%)
From: djpate at gmail dot com Assigned:
Status: Open Package: oauth (PECL)
PHP Version: 5.3.8 OS: Ubuntu 11.10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: djpate at gmail dot com
New email:
PHP Version: OS:

 

 [2011-11-24 20:36 UTC] djpate at gmail dot com
Description:
------------
I'm trying to send a post request with an array of references but I keep on getting a signature do not match error.

Test script:
---------------
$args = array("country"=>"fr","reference"=>array(1,2,3));

$this->fetch("http://".$this->url."/user/".$user."/size",$args,OAUTH_HTTP_METHOD_POST);

Expected result:
----------------
The data

Actual result:
--------------
[lastResponse] => Signatures do not match
    [debugInfo] => Array
        (
            [sbs] => POST&http%3A%2F%2Ffitapi.localhost%2Fuser%2F6352%2Fsize%2F&country%3DFR%26oauth_consumer_key%3Dmykey%26oauth_nonce%3D15175009694eceaa36967b94.47636443%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1322166838%26oauth_token%3D7a3e2ffafc0520e4bc317d0c43c87b22df58cdda%26oauth_version%3D1.0%26reference%3D1%26reference%3D2%26reference%3D3
            [headers_sent] => Authorization: OAuth oauth_consumer_key="mykey",oauth_signature_method="HMAC-SHA1",oauth_nonce="15175009694eceaa36967b94.47636443",oauth_timestamp="1322166838",oauth_version="1.0",oauth_token="7a3e2ffafc0520e4bc317d0c43c87b22df58cdda",oauth_signature="k9IMNm2x%2Fxho%2FDfJVWbC%2BGQPxIw%3D"
Content-Type: application/x-www-form-urlencoded
            [headers_recv] => HTTP/1.0 403 Forbidden
Date: Thu, 24 Nov 2011 20:33:58 GMT
Server: Apache/2.2.20 (Ubuntu)
X-Powered-By: PHP/5.3.6-13ubuntu3.2
Set-Cookie: PHPSESSID=jmgbqaqkfjbj85skgm8odumn84; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
cache-control: no-cache
Vary: Accept-Encoding
Content-Length: 23
Connection: close
Content-Type: text/html; charset=UTF-8
            [body_sent] => country=FR&reference=1&reference=2&reference=3
            [body_recv] => Signatures do not match
        )


-----

It works with 

$args = array("country"=>"fr","reference"=>1);

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 23:01:27 2024 UTC