Skip to content

Pre-encoded query string is decoded #643

@jpg0

Description

@jpg0

🐛 Bug Report

Currently it's not possible to connect with a URL that contains a %2F (for example). This will always be decoded to '/'.

🔬 How To Reproduce

Pass in a query string with a %2F:
.webSocketConfig(MqttClientWebSocketConfig.builder().uri("wss://foo/path?query%2Fstring"))

The problem

AWS IOT Signature v4 expects this escaping and appears to require it. The JDK URLEncoder class seems to think it's not necessary. This is currently blocking me from being able to connect to an AWS endpoint - the reason being that the passed in URI is copied into and out of a URI class (which decodes, then doesn't re-encode the characters). Paho, for example, does not do this and instead leaves the String as-is, hence can connect fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions