Re: colon within resource

Jonathan Morton <[email protected]>
Newsgroups gmane.mail.spam.hashcash
Message-ID <[email protected]>
> is there a standard way to handle a colon (:) within a stamps resource?

I don't believe there is - the intention is to leave that to the 
extension definition.  That way, simple extensions don't have to parse 
a potentially complex encoding, unless they need to.  However, I can 
offer suggestions.

The hashcash token as a whole is limited to the alphabet allowed in 
electronic message headers.  The alphabet used by each field is further 
reduced by the colon separator, and the extension field's alphabet is 
also reduced by the use of a comma to separate different extensions.  
The name of an extension also cannot contain an equals sign, because 
that separates it from the extension body.

With that in mind, there are several possibilities.  If all you need is 
a separator that won't be confused with the ones used elsewhere, either 
the semicolon or pipe symbol should suffice.  Both of these are outside 
the Base64 alphabet, but within that allowed in the extension field.

If your needs are more general, however, I suggest URL encoding for 
data which is mostly ASCII text, and Base64 otherwise.  Note that the 
Base64 alphabet contains the equals sign, so it can only be used in the 
extension body, not the name, but this should not be restrictive in 
practice.  Either URL or Base64 encoding can be used with semicolon 
and/or pipe-symbol separators without confusion.

--------------------------------------------------------------
from:     Jonathan "Chromatix" Morton
mail:     [email protected]
website:  http://www.chromatix.uklinux.net/
tagline:  The key to knowledge is not to rely on people to teach you it.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.