export url-encode, fixes #8

master
Hans Huebner 2012-03-03 08:51:03 -05:00
parent 0a038567ee
commit 9cd22515bb
3 changed files with 40 additions and 38 deletions

View File

@ -1,3 +1,4 @@
Export URL-ENCODE (suggested by Rob Blackwell)
Fix incorrect range header syntax
Version 1.2.5

View File

@ -32,40 +32,41 @@
(defpackage :drakma
(:use :cl :puri :flexi-streams :chunga)
;; the variable defined in the ASDF system definition
(:import-from :drakma-asd :*drakma-version-string*)
(:shadow :syntax-error :parameter-error)
(:export :*allow-dotless-cookie-domains-p*
:*body-format-function*
:*remove-duplicate-cookies-p*
:*drakma-default-external-format*
:*header-stream*
:*ignore-unparseable-cookie-dates-p*
:*text-content-types*
:cookie
:cookie-error
:cookie-error-cookie
:cookie-date-parse-error
:cookie-domain
:cookie-expires
:cookie-http-only-p
:cookie-jar
:cookie-jar-cookies
:cookie-name
:cookie-path
:cookie-securep
:cookie-value
:cookie=
:delete-old-cookies
:drakma-condition
:drakma-error
:drakma-warning
:get-content-type
:header-value
:http-request
:parameter-error
:parameter-present-p
:parameter-value
:parse-cookie-date
:read-tokens-and-parameters
:split-tokens
:syntax-error))
(:import-from :drakma-asd #:*drakma-version-string*)
(:shadow #:syntax-error #:parameter-error)
(:export #:*allow-dotless-cookie-domains-p*
#:*body-format-function*
#:*remove-duplicate-cookies-p*
#:*drakma-default-external-format*
#:*header-stream*
#:*ignore-unparseable-cookie-dates-p*
#:*text-content-types*
#:cookie
#:cookie-error
#:cookie-error-cookie
#:cookie-date-parse-error
#:cookie-domain
#:cookie-expires
#:cookie-http-only-p
#:cookie-jar
#:cookie-jar-cookies
#:cookie-name
#:cookie-path
#:cookie-securep
#:cookie-value
#:cookie=
#:delete-old-cookies
#:drakma-condition
#:drakma-error
#:drakma-warning
#:get-content-type
#:header-value
#:http-request
#:parameter-error
#:parameter-present-p
#:parameter-value
#:parse-cookie-date
#:read-tokens-and-parameters
#:split-tokens
#:syntax-error
#:url-encode))

View File

@ -95,7 +95,7 @@ PREFIX whereby the elements are compared using TEST."
(defun url-encode (string external-format)
"Returns a URL-encoded version of the string STRING using the
LispWorks external format EXTERNAL-FORMAT."
external format EXTERNAL-FORMAT."
(with-output-to-string (out)
(loop for octet across (string-to-octets (or string "")
:external-format external-format)