-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
MQTT: Unexpected handling of multi-level wildcard ("#") #7316
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
Comments
A stand-alone |
Hm ... you're right of course; somehow I connected dropping the fragment part with HTTP usage only 🤦 Could you then maybe amend the error message ("...; did you forget to percent-encode a hash character?") or add a specific one for this case? |
... and mention that it needs URL encoding. Reported-by: Peter Körner Fixes #7316
The PR #7317 now makes it say: No MQTT topic found. Forgot to URL encode it? |
@bagder Thank you for the quick fix. There's another, non-minimal, case where this is an issue, and actually more subtle - when the topic consists of more than the wildcard:
In this case, curl will subscribe to Thus, could you also add a warning for this case with reasonable effort? At least in verbose mode to help with debugging if you think it's too much otherwise? ... or could/should there rather be a generic warning for all protocols maybe, in case there is a fragment part and it's being dropped? |
I did this
Try to do an MQTT subscribe using the multi-level wildcard (
#
):I expected the following
curl subscribing using the multi-level wildcard (
#
) instead of dropping the hash character. For comparison, using the single-level wildcard (+
), subscribing works as expected.Workaround: Percent-encode the wildcard (i.e.
mqtt://localhost/%23
).curl/libcurl version
operating system
Alpine Linux 3.14.0
The text was updated successfully, but these errors were encountered: