FoundationDB/sql-layer — pull request #1279 by MMcM (2014-05-05 20:28:51+00:00)
Title: Improve REST parsing of binary primary keys

Allows binary keys to be of the form hex:digits or base64:chars. Makes URL encoding with % use exactly that byte, without UTF-8 as an intermediate.

This is not entirely satisfactory, because it still provides a bunch of alternatives, only one of which works in all cases.

* The problem with URL encoding is that Jetty tries to parse the whole path, so that illegal UTF-8 gives a 400 before our code is invoked.
* The problem with base64 encoding is that / is the 64th code. We could say use %2F, but people may not encounter the problem for some time.

The only solution I can think of would be to incompatibly accept *only* hex digits, which would be asymmetrical with the results returned, unless we changed that too. I'm open to other suggestions.