[drakma-devel] URL-encode and rfc3986
Red Daly
reddaly at gmail.com
Sun Oct 4 20:39:49 UTC 2009
Drakma encodes spaces in URLs as pluses instead of "%20"s. It also leaves
the characters "$-_.!*'()" unencoded instead of the RFC3986 unencoded set:
"-_.~".
This is okay for tolerant servers but for other applications it is a bug.
For example, in OAuth it is necessary to conform to RFC3986 or the signature
will be incorrect for the request.
To make Drakma more RFC3986-compliant, replace these four lines in
util.lisp:
(find char "$-_.!*'()," :test #'char=))
(write-char char out))
((char= char #\Space)
(write-char #\+ out))
with these two:
(find char "-_.~" :test #'char=))
(write-char char out))
Best regards,
Red
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/drakma-devel/attachments/20091004/99500c54/attachment.html>
More information about the Drakma-devel
mailing list