[drakma-devel] URL-encode and rfc3986

Edi Weitz edi at agharta.de
Mon Oct 5 06:09:23 UTC 2009


On Sun, Oct 4, 2009 at 10:39 PM, Red Daly <reddaly at gmail.com> wrote:
> 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))

Thanks for the info.  If you can send a proper patch I'll make a new
release immediately.

  http://weitz.de/patches.html

Edi.




More information about the Drakma-devel mailing list