You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2014/08/22 14:48:12 UTC

[jira] [Updated] (AMQ-4756) / in queue name converted to . when using REST API to create messages on queues

     [ https://issues.apache.org/jira/browse/AMQ-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated AMQ-4756:
-----------------------------

    Assignee:     (was: Claus Ibsen)

> / in queue name converted to . when using REST API to create messages on queues
> -------------------------------------------------------------------------------
>
>                 Key: AMQ-4756
>                 URL: https://issues.apache.org/jira/browse/AMQ-4756
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.8.0
>         Environment: jdk 1.6
> curl 7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8y zlib/1.2.5
> Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
> Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz
>            Reporter: eebbesen
>            Priority: Minor
>             Fix For: NEEDS_REVIEW
>
>
> My 5.0.8 ActiveMQ queue is named queue/andburn. Using
> {noformat}
> curl -u admin:admin -d 'body="Aardvark"' "http://localhost:8161/api/message/queue/andburn?type=queue"
> {noformat}
> or 
> {noformat}
> curl -u admin:admin -d 'body="Aardvark"' 'http://localhost:8161/api/message/queue/andburn?type=queue'
> {noformat}
> creates a new queue {{queue.andburn}}. When I escape {{/}} like {{\/}} I get {{queue\.andburn}}. When I omit {{type=queue}} I don't see my message added to my existing queue. Same when I use {{&#47;}} or {{%2F}} to represent slashes.
> Note: all escaping was done after queue in the URI, e.g.
> {noformat}
> "http://localhost:8161/api/message/queue\/andburn?type=queue"
> {noformat}
> [The ActiveMQ REST|http://activemq.apache.org/rest.html] page was not helpful in addressing this.
> This is also happening when sending requests to ActiveMQ via a Ruby script using the RestClient gem.
> {noformat}
> require 'rest_client'
> require 'rubygems'
> @user = 'admin'
> @pass = 'admin'
> @host = 'localhost'
> @port = '8161'
> @queue = "queue/andburn"
> @post_ws = "/api/message/#{@queue}?type=queue"
> payload = "some_topic"
> url = "http://#{@user}:#{@pass}@#{@host}:#{@port}#{@post_ws}"
> response = RestClient.post(url, 'body' => payload)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)