export url-encode, fixes #8
parent
0a038567ee
commit
9cd22515bb
|
@ -1,3 +1,4 @@
|
|||
Export URL-ENCODE (suggested by Rob Blackwell)
|
||||
Fix incorrect range header syntax
|
||||
|
||||
Version 1.2.5
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue