Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

urlencode replaced by rawurlencode to avoid encoding issues

  • Loading branch information...
commit cda167d7649bf28065cf670b100807d5401299b8 1 parent 8676f5a
@thousandsofthem thousandsofthem authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 IronMQ.class.php
View
10 IronMQ.class.php
@@ -183,7 +183,7 @@ public function getQueues($page = 0){
* @return mixed
*/
public function getQueue($queue_name) {
- $queue = urlencode($queue_name);
+ $queue = rawurlencode($queue_name);
$url = "projects/{$this->project_id}/queues/$queue";
$this->setJsonHeaders();
return self::json_decode($this->apiCall(self::GET, $url));
@@ -215,7 +215,7 @@ public function postMessage($queue_name, $message) {
"messages" => array($msg->asArray())
);
$this->setCommonHeaders();
- $queue = urlencode($queue_name);
+ $queue = rawurlencode($queue_name);
$url = "projects/{$this->project_id}/queues/$queue/messages";
$res = $this->apiCall(self::POST, $url, $req);
return self::json_decode($res);
@@ -237,7 +237,7 @@ public function postMessages($queue_name, $messages) {
array_push($req['messages'], $msg->asArray());
}
$this->setCommonHeaders();
- $queue = urlencode($queue_name);
+ $queue = rawurlencode($queue_name);
$url = "projects/{$this->project_id}/queues/$queue/messages";
$res = $this->apiCall(self::POST, $url, $req);
return self::json_decode($res);
@@ -251,7 +251,7 @@ public function postMessages($queue_name, $messages) {
* @return array|null array of messages or null
*/
public function getMessages($queue_name, $count=1) {
- $queue = urlencode($queue_name);
+ $queue = rawurlencode($queue_name);
$url = "projects/{$this->project_id}/queues/$queue/messages";
$params = array();
if($count > 1) {
@@ -284,7 +284,7 @@ public function getMessage($queue_name) {
public function deleteMessage($queue_name, $message_id) {
$this->setCommonHeaders();
- $queue = urlencode($queue_name);
+ $queue = rawurlencode($queue_name);
$url = "projects/{$this->project_id}/queues/$queue/messages/{$message_id}";
return $this->apiCall(self::DELETE, $url);
}
Please sign in to comment.
Something went wrong with that request. Please try again.