You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by "Christian Posta (JIRA)" <ji...@apache.org> on 2013/01/26 00:29:13 UTC

[jira] [Commented] (APLO-289) spaces in topic IDs get "\u0020" inserted before them

    [ https://issues.apache.org/jira/browse/APLO-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13563159#comment-13563159 ] 

Christian Posta commented on APLO-289:
--------------------------------------

Looks like when we decode the destination, and create a new SimpleAddress, we encode the path and that eventually calls DestinationAddress.escape(value)...

A simple test of:

    val s  = DestinationAddress.escape("this is a test")
    print(s)

will produce
this\u0020 is\u0020 a\u0020 test


This probably happens when we escape unicode characters...
Is space something we want to escape? Either way, if we escape it we can keep the original space from being appended...

Hiram, am I on the right track? What's the anticipated behavior here?
                
> spaces in topic IDs get "\u0020" inserted before them
> -----------------------------------------------------
>
>                 Key: APLO-289
>                 URL: https://issues.apache.org/jira/browse/APLO-289
>             Project: ActiveMQ Apollo
>          Issue Type: Bug
>          Components: apollo-stomp
>    Affects Versions: 1.5
>            Reporter: Avril Kenney
>            Assignee: Hiram Chirino
>            Priority: Minor
>              Labels: characters, destinations, queue, topic, unicode
>             Fix For: 1.6
>
>
> If I try to create a topic/queue with a space in the name, it inserts "\u0020" preceding each space.
> Here is an example in Python:
> --------
> import socket
> connect_frame = 'CONNECT\n\nlogin:admin\npasscode:password\n\n\x00'
> frame = 'SEND\ndestination:/topic/the next topic\n\nhello\x00'
> sock.connect(host_and_ports) # where host_and_ports is a tuple (host, port)
> sock.sendall(connect_frame)
> sock.sendall(frame)
> --------
> Then when I get the topic information (by looking at it in the web interface or by http-getting the json info in Python), the topic id is
> the\u0020 next\u0020 topic
> We recently upgraded from Apollo 1.0 to 1.5, and I think that this issue coincides with the upgrade (there were definitely successful uses of topics with spaces in them before the upgrade).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira