Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

HTTP URL encoding specification improvement #243

Open
dennisg opened this issue Jun 1, 2015 · 3 comments
Open

HTTP URL encoding specification improvement #243

dennisg opened this issue Jun 1, 2015 · 3 comments

Comments

@dennisg
Copy link

dennisg commented Jun 1, 2015

In the UriBeacon HTTP URL encoding chapter (specification/AdvertisingMode.md) it is described how the bytes listed in the table are expanded to their respective expansion texts. It is however not described how a given URL should be shortened. For example:

http://u1hr8.infoub.org/t23

can be shortened to: <0x02> u1hr8 <0x0B> ub <0x01> t23.

The current implementation actually does this, but the spec could easily be read to just shorten the domain extension, like so:

<0x02> u1hr8.infoub <0x01> t23 which would be wasteful in the sense that it uses 4 more bytes than the first version. It might be better to describe the shortening process in more detail to make sure other implementations follow the reference implementation.

Thanks !

@schilit
Copy link
Contributor

schilit commented Jun 28, 2015

Thanks for noticing. You are right that the codes can be recognized anywhere in the string. Do you want to provide a fix?

dennisg added a commit to dennisg/uribeacon that referenced this issue Jun 29, 2015
@dennisg
Copy link
Author

dennisg commented Jul 7, 2015

does this small addition make any sense ? comments/ improvements are welcome.

@schilit
Copy link
Contributor

schilit commented Jul 7, 2015

I think this makes sense to add to the specification something like "Any
strings within the URL, not just the suffix, will be substituted."

On Tue, Jul 7, 2015 at 2:37 AM, Dennis Geurts [email protected]
wrote:

does this small addition make any sense ? comments/ improvements are
welcome.


Reply to this email directly or view it on GitHub
#243 (comment).

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

No branches or pull requests

2 participants