-
Notifications
You must be signed in to change notification settings - Fork 188
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
Change BlutoothManufacturerData.data to base64-encoded tstr #633
Conversation
It seems weird to push how to encode binary data into individual specs. Can we get some guidance from WebDriver BiDi folks on the correct type for this type of argument? |
BiDi spec has one example that encodes binary data, and that seems to refer to forgiving-base64 encode. Perhaps it makes sense for BiDi to (re-)export a definition that allows other specs to link to the correct way to encode binary data. /cc @OrKoN |
Yes, using base64 and a text string is currently recommended for binary data if the size is relatively small and can be inline in a protocol message. |
To clarify, I think referencing the base64 algorithm in the infra spec is sufficient as we do not have a central place to handle binary data in the WebDriver BiDi spec. Also from the client and implementation perspective the format is command/event-specific and we do not expect to change/specify it centrally. If we have a better way in the future, we can re-visit but so far I know know of plans to have a better way to deal with large binary files but I do not think a solution for that would be applicable here since CDP also implements this data as base64-encoded strings. |
SHA: f3b3187 Reason: push, by reillyeon Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: f3b3187 Reason: push, by reillyeon Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: f3b3187 Reason: push, by reillyeon Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: f3b3187 Reason: push, by reillyeon Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR is changing
BluetoothManufacturerData.data
from being abstr
and defining it as a base64 encoded text representation as atstr
. Since BiDi is a protocol over JSON, this seems the correct way to represent bytes per RFC 8610.Preview | Diff