You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/03/06 19:37:45 UTC

[GitHub] [pulsar] grantwwu opened a new issue #3769: Websocket interface does not decode URLencoding

grantwwu opened a new issue #3769: Websocket interface does not decode URLencoding
URL: https://github.com/apache/pulsar/issues/3769
 
 
   **Describe the bug**
   The Pulsar websocket server does not appear to decode URL encoded URLs properly.  This leads to consuming from (and presuming producing to, but I didn't test this) the wrong topic.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Attempt to consume from a *new* topic whose name includes an RFC 3986 reserved character.  For this bug report, I am using the topic name `public/default/pusheennstormy[]`.  To encode this into a valid URL, note that you will need to URL encode the square brackets.  The resulting URL ought to look something like this: `pulsar-broker.petuum-system:8080/ws/v2/consumer/persistent/public/default/pusheennstormy%5B%5D/3ab32f35-6c3f-4e8a-a120-409091bb3cea`
   2. Note that the the new topic created is not `public/default/pusheennstormy[]` as expected, but actually is the URL encoded form.
   
   **Expected behavior**
   The `public/default/pusheennstormy[]` topic should be created.
   
   **Log lines**
   ```
   19:14:58.299 [pulsar-client-io-53-6] INFO  org.apache.pulsar.client.impl.ConsumerImpl - [persistent://public/default/pusheennstormy%5B%5D][3ab32f35-6c3f-4e8a-a120-409091bb3cea] Subscribing to topic on cnx [id: 0x190c12dc, L:/10.244.1.53:37080 - R:10.244.2.32/10.244.2.32:6650]
   19:14:58.358 [pulsar-client-io-53-6] INFO  org.apache.pulsar.client.impl.ConsumerImpl - [persistent://public/default/pusheennstormy%5B%5D][3ab32f35-6c3f-4e8a-a120-409091bb3cea] Subscribed to topic on 10.244.2.32/10.244.2.32:6650 -- consumer: 3
   19:14:58.359 [pulsar-web-30-25] INFO  org.eclipse.jetty.server.RequestLog - 10.244.0.61 - - [06/Mar/2019:19:14:58 +0000] "GET //pulsar-broker.petuum-system:8080/ws/v2/consumer/persistent/public/default/pusheennstormy%5B%5D/3ab32f35-6c3f-4e8a-a120-409091bb3cea HTTP/1.1" 101 0 "-" "-"  70
   19:14:58.359 [pulsar-web-30-25] INFO  org.apache.pulsar.websocket.AbstractWebSocketHandler - [/10.244.0.61:46224] New WebSocket session on topic persistent://public/default/pusheennstormy%5B%5D
   ```
   
   **Desktop (please complete the following information):**
    - Running on Pulsar 2.2.1 using the `pulsar-all` docker image w/ Kubernetes
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services