Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-encoded query string is decoded #643

Open
jpg0 opened this issue Nov 2, 2024 · 0 comments
Open

Pre-encoded query string is decoded #643

jpg0 opened this issue Nov 2, 2024 · 0 comments
Labels

Comments

@jpg0
Copy link

jpg0 commented Nov 2, 2024

🐛 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant