Revision: 4495
Author: edi
URL: http://bknr.net/trac/changeset/4495
changelog
U trunk/thirdparty/hunchentoot/CHANGELOG
Modified: trunk/thirdparty/hunchentoot/CHANGELOG
===================================================================
--- trunk/thirdparty/hunchentoot/CHANGELOG 2009-12-28 16:40:26 UTC (rev 4494)
+++ trunk/thirdparty/hunchentoot/CHANGELOG 2009-12-28 16:41:17 UTC (rev 4495)
@@ -2,10 +2,11 @@
Re-introduced *CATCH-ERRORS-P* and MAYBE-INVOKE-DEBUGGER
Integration with trivial-backtrace (see *LOG-LISP-BACKTRACES-P*)
Treat :UNSPECIFIC like NIL in pathname components (reported by Frode Fjeld)
-Prepare for LispWorks 6 (Nico de Jager)
-Fix reading of post parameters (Peter Seibel and Stephen P. Compall)
-Fix STOP by supplying the :READY-ONLY keyword to USOCKET:WAIT-FOR-INPUT
-Enable SSL key passwords for Lisps other than LW (Vsevolod)
+Fixed RESET-SESSIONS
+Prepared for LispWorks 6 (Nico de Jager)
+Fixed reading of post parameters (Peter Seibel and Stephen P. Compall)
+Fixed STOP by supplying the :READY-ONLY keyword to USOCKET:WAIT-FOR-INPUT
+Enabled SSL key passwords for Lisps other than LW (Vsevolod)
Version 1.0.0
2009-02-19
Revision: 4493
Author: edi
URL: http://bknr.net/trac/changeset/4493
Missing changelog entry
U trunk/thirdparty/hunchentoot/CHANGELOG
Modified: trunk/thirdparty/hunchentoot/CHANGELOG
===================================================================
--- trunk/thirdparty/hunchentoot/CHANGELOG 2009-12-27 23:12:39 UTC (rev 4492)
+++ trunk/thirdparty/hunchentoot/CHANGELOG 2009-12-27 23:14:59 UTC (rev 4493)
@@ -3,7 +3,7 @@
Integration with trivial-backtrace (see *LOG-LISP-BACKTRACES-P*)
Treat :UNSPECIFIC like NIL in pathname components (reported by Frode Fjeld)
Prepare for LispWorks 6 (Nico de Jager)
-Fix reading of post parameters (Peter Seibel)
+Fix reading of post parameters (Peter Seibel and Stephen P. Compall)
Fix STOP by supplying the :READY-ONLY keyword to USOCKET:WAIT-FOR-INPUT
Enable SSL key passwords for Lisps other than LW (Vsevolod)
Revision: 4491
Author: edi
URL: http://bknr.net/trac/changeset/4491
Documentation
U trunk/thirdparty/hunchentoot/doc/index.xml
U trunk/thirdparty/hunchentoot/request.lisp
Modified: trunk/thirdparty/hunchentoot/doc/index.xml
===================================================================
--- trunk/thirdparty/hunchentoot/doc/index.xml 2009-12-27 21:10:34 UTC (rev 4490)
+++ trunk/thirdparty/hunchentoot/doc/index.xml 2009-12-27 21:53:14 UTC (rev 4491)
@@ -613,18 +613,11 @@
stream object in <clix:arg>socket</clix:arg>. It reads the request headers, sets up the
<a href="#requests">request</a> and <a href="#replies">reply</a>
objects, and hands over to <clix:ref>PROCESS-REQUEST</clix:ref> which
-selects and calls a handler for the request and sends its reply to the
-client. This is done in a loop until the stream has to be closed or
-until a connection timeout occurs.
-
-<p>
-It is probably not a good idea to re-implement this method until you
-really, really know what you're doing, but you can for example write
-an around method specialized for your subclass
-of <clix:ref>ACCEPTOR</clix:ref> which binds or rebinds special
-variables which can then be accessed by
-your <a href="#handlers">handlers</a>.
-</p>
+calls <clix:ref>HANDLE-REQUEST</clix:ref> to select and call a handler
+for the request and sends its reply to the client. This is done in a
+loop until the stream has to be closed or until a connection timeout
+occurs. It is probably not a good idea to re-implement this method
+until you really, really know what you're doing.
</clix:description>
</clix:function>
@@ -766,35 +759,41 @@
<clix:subchapter name="request-dispatch" title="Request dispatch and handling">
-The main job of <clix:ref>PROCESS-REQUEST</clix:ref> is to select and
+The main job of <clix:ref>HANDLE-REQUEST</clix:ref> is to select and
call a function which handles the request, i.e. which looks at the
data the client has sent and prepares an appropriate reply to send
-back. This is implemented as follows:
+back. This is by default implemented as follows:
<p>
Each acceptor has a <a href="#acceptor-request-dispatcher"><em>request
dispatcher</em></a> which is a unary function that accepts
-a <clix:ref>REQUEST</clix:ref> object. This function is called by
-<clix:ref>PROCESS-REQUEST</clix:ref>. The idea is that this function
-looks at the request object and depending on its contents decides to
-call another function which "does the work". This "other" function is
-by convention called a <a class="none" name="handlers"><em>request
-handler</em></a>. (Obviously, this is really only a convention as
-process-request doesn't "know" what the request dispatcher does. You
-could as well say that the request dispatcher and the request handler
-have the same job.)
+a <clix:ref>REQUEST</clix:ref> object. This function is called by the
+default method of <clix:ref>HANDLE-REQUEST</clix:ref>. The idea is
+that this function looks at the request object and depending on its
+contents decides to call another function which "does the work". This
+"other" function is by convention called a <a class="none"
+name="handlers"><em>request handler</em></a>. (Obviously, this is
+really only a convention as <clix:ref>HANDLE-REQUEST</clix:ref>
+doesn't "know" what the request dispatcher does. You could as well
+say that the request dispatcher and the request handler have the same
+job.)
</p>
<p>
-The default behaviour, unless you implement your own request
+The default behaviour, unless your acceptor has its own request
dispatcher, is that Hunchentoot walks through the list
-*dispatch-table* which consists of <em>dispatch functions</em>. Each
-of these functions accepts the request object as its only argument and
-either returns a request handler to handle the request
-or <code>NIL</code> which means that the next dispatcher in the list
-will be tried. If all dispatch functions return <code>NIL</code>, the
-return code
+<clix:ref>*DISPATCH-TABLE*</clix:ref> which consists of <em>dispatch
+functions</em>. Each of these functions accepts the request object as
+its only argument and either returns a request handler to handle the
+request or <code>NIL</code> which means that the next dispatcher in
+the list will be tried. If all dispatch functions
+return <code>NIL</code>, the return code
<clix:ref>+HTTP-NOT-FOUND+</clix:ref> will be sent to the client.
</p>
<p>
+The default method of <clix:ref>HANDLE-REQUEST</clix:ref> also sets up
+<a href="#logging">standard error handling</a> before it calls the acceptor's request
+dispatcher.
+</p>
+<p>
All functions and variables in this section are related to the
standard request dispatch mechanism described above and are
meaningless if you're using your own request dispatcher.
@@ -1570,24 +1569,48 @@
</clix:returns>
<clix:description>
This function is called by <clix:ref>PROCESS-CONNECTION</clix:ref>
-after the incoming headers have been read. It selects and calls a
-<a href="#handlers">handler</a> and sends the output of this handler
-to the client. It also sets up simple error handling for the request
-handler. Note that <clix:ref>PROCESS-CONNECTION</clix:ref> is called
-once per connection and loops in case of a persistent connection
-while <clix:ref>PROCESS-REQUEST</clix:ref> is called anew for each
-request.
+after the incoming headers have been read. It
+calls <clix:ref>HANDLE-REQUEST</clix:ref> (and is more or less just a
+thin wrapper around it) to select and call a
+<a href="#handlers">handler</a> and send the output of this handler to
+the client. Note that <clix:ref>PROCESS-CONNECTION</clix:ref> is
+called once per connection and loops in case of a persistent
+connection while <clix:ref>PROCESS-REQUEST</clix:ref> is called anew
+for each request.
<p>
-Like <clix:ref>PROCESS-CONNECTION</clix:ref>, this might be a good
-place to introduce around methods which bind special variables or do
-other interesting things.
+The return value of this function is ignored.
</p>
<p>
-The return value of this function is ignored.
+Like <clix:ref>PROCESS-CONNECTION</clix:ref>, this is another function
+the behaviour of which you should only modify if you really, really
+know what you're doing.
</p>
</clix:description>
</clix:function>
+ <clix:function generic='true' name='handle-request'>
+ <clix:lambda-list>acceptor request
+ </clix:lambda-list>
+ <clix:returns>content
+ </clix:returns>
+ <clix:description>
+This function is called by <clix:ref>PROCESS-REQUEST</clix:ref> once
+the request has been read and a <clix:ref>REQUEST</clix:ref> object
+has been created. Its job is to actually handle the request, i.e. to
+return something to the client.
+<p>
+The default method calls the
+acceptor's <a href="#request-dispatch">request dispatcher</a>, but you
+can of course implement a different behaviour. The default method
+also sets up <a href="#logging">standard error handling</a> for
+the <a href="#handlers">handler</a>.
+</p>
+<p>
+Might be a good place to bind or rebind special variables which can
+then be accessed by your <a href="#handlers">handlers</a>.
+</p>
+ </clix:description>
+ </clix:function>
<clix:readers generic='true'>
Modified: trunk/thirdparty/hunchentoot/request.lisp
===================================================================
--- trunk/thirdparty/hunchentoot/request.lisp 2009-12-27 21:10:34 UTC (rev 4490)
+++ trunk/thirdparty/hunchentoot/request.lisp 2009-12-27 21:53:14 UTC (rev 4491)
@@ -97,16 +97,14 @@
(defgeneric process-request (request)
(:documentation "This function is called by PROCESS-CONNECTION after
-the incoming headers have been read. It selects and calls a handler
-and sends the output of this handler to the client using START-OUTPUT.
-It also sets up simple error handling for the request handler. Note
-that PROCESS-CONNECTION is called once per connection and loops in
-case of a persistent connection while PROCESS-REQUEST is called anew
-for each request.
+the incoming headers have been read. It calls HANDLE-REQUEST to
+select and call a handler and sends the output of this handler to the
+client using START-OUTPUT. Note that PROCESS-CONNECTION is called
+once per connection and loops in case of a persistent connection while
+PROCESS-REQUEST is called anew for each request.
-Like PROCESS-CONNECTION, this might be a good place to introduce
-around methods which bind special variables or do other interesting
-things.
+Essentially, you can view process-request as a thin wrapper around
+HANDLE-REQUEST.
The return value of this function is ignored."))
Revision: 4490
Author: edi
URL: http://bknr.net/trac/changeset/4490
Resurrect *catch-errors-p* and more
Some documentation still has to be updated
U trunk/thirdparty/hunchentoot/CHANGELOG
U trunk/thirdparty/hunchentoot/acceptor.lisp
U trunk/thirdparty/hunchentoot/conditions.lisp
U trunk/thirdparty/hunchentoot/doc/index.xml
U trunk/thirdparty/hunchentoot/easy-handlers.lisp
U trunk/thirdparty/hunchentoot/headers.lisp
D trunk/thirdparty/hunchentoot/hunchentoot-test.asd
U trunk/thirdparty/hunchentoot/hunchentoot.asd
U trunk/thirdparty/hunchentoot/lispworks.lisp
U trunk/thirdparty/hunchentoot/packages.lisp
U trunk/thirdparty/hunchentoot/request.lisp
U trunk/thirdparty/hunchentoot/specials.lisp
U trunk/thirdparty/hunchentoot/taskmaster.lisp
U trunk/thirdparty/hunchentoot/url-rewrite/primitives.lisp
Change set too large, please see URL above
Revision: 4489
Author: edi
URL: http://bknr.net/trac/changeset/4489
Revoke commit 4477
U trunk/thirdparty/hunchentoot/doc/index.xml
U trunk/thirdparty/hunchentoot/packages.lisp
U trunk/thirdparty/hunchentoot/request.lisp
Modified: trunk/thirdparty/hunchentoot/doc/index.xml
===================================================================
--- trunk/thirdparty/hunchentoot/doc/index.xml 2009-12-22 22:14:35 UTC (rev 4488)
+++ trunk/thirdparty/hunchentoot/doc/index.xml 2009-12-22 22:28:12 UTC (rev 4489)
@@ -1594,33 +1594,17 @@
</clix:returns>
<clix:description>
This function is called by <clix:ref>PROCESS-CONNECTION</clix:ref>
-after the incoming headers have been read. It
-calls <clix:ref>DISPATCH-REQUEST</clix:ref> and sends its output to
-the client. It also sets up simple error handling for the request
-handler.
-<p>
-The return value of this function is ignored.
-</p>
- </clix:description>
- </clix:function>
-
- <clix:function generic='true' name='dispatch-request'>
- <clix:lambda-list>request
- </clix:lambda-list>
- <clix:returns>nil
- </clix:returns>
- <clix:description>
-This function is called by <clix:ref>PROCESS-REQUEST</clix:ref>. It
-selects and calls a
-<a href="#handlers">handler</a> to process the request.
-<p>
-This might be a good place to introduce around methods which bind
-special variables or do other interesting things that are relevant to
-the particular request. Note
-that <clix:ref>DISPATCH-REQUEST</clix:ref> is called once per
-connection and loops in case of a persistent connection,
+after the incoming headers have been read. It selects and calls a
+<a href="#handlers">handler</a> and sends the output of this handler
+to the client. It also sets up simple error handling for the request
+handler. Note that <clix:ref>PROCESS-CONNECTION</clix:ref> is called
+once per connection and loops in case of a persistent connection
while <clix:ref>PROCESS-REQUEST</clix:ref> is called anew for each
request.
+<p>
+Like <clix:ref>PROCESS-CONNECTION</clix:ref>, this might be a good
+place to introduce around methods which bind special variables or do
+other interesting things.
</p>
<p>
The return value of this function is ignored.
Modified: trunk/thirdparty/hunchentoot/packages.lisp
===================================================================
--- trunk/thirdparty/hunchentoot/packages.lisp 2009-12-22 22:14:35 UTC (rev 4488)
+++ trunk/thirdparty/hunchentoot/packages.lisp 2009-12-22 22:28:12 UTC (rev 4489)
@@ -167,7 +167,6 @@
"DELETE-AUX-REQUEST-VALUE"
"DELETE-SESSION-VALUE"
"DISPATCH-EASY-HANDLERS"
- "DISPATCH-REQUEST"
"ESCAPE-FOR-HTML"
"EXECUTE-ACCEPTOR"
"GET-PARAMETER"
Modified: trunk/thirdparty/hunchentoot/request.lisp
===================================================================
--- trunk/thirdparty/hunchentoot/request.lisp 2009-12-22 22:14:35 UTC (rev 4488)
+++ trunk/thirdparty/hunchentoot/request.lisp 2009-12-22 22:28:12 UTC (rev 4489)
@@ -95,22 +95,21 @@
can subclass REQUEST in order to implement your own behaviour. See
the REQUEST-CLASS slot of the ACCEPTOR class."))
-(defgeneric dispatch-request (request)
- (:documentation "This function is called by PROCESS-REQUEST. It
-selects and calls a handler to process the request.
-
-This might be a good place to introduce around methods which bind
-special variables or do other interesting things that are relevant to
-the particular request. Note that DISPATCH-REQUEST is called once per
-connection and loops in case of a persistent connection, while
-PROCESS-REQUEST is called anew for each request."))
-
(defgeneric process-request (request)
(:documentation "This function is called by PROCESS-CONNECTION after
-the incoming headers have been read. It calls DISPATCH-REQUEST and
-sends its output to the client. It also sets up simple error handling
-for the request handler."))
+the incoming headers have been read. It selects and calls a handler
+and sends the output of this handler to the client using START-OUTPUT.
+It also sets up simple error handling for the request handler. Note
+that PROCESS-CONNECTION is called once per connection and loops in
+case of a persistent connection while PROCESS-REQUEST is called anew
+for each request.
+Like PROCESS-CONNECTION, this might be a good place to introduce
+around methods which bind special variables or do other interesting
+things.
+
+The return value of this function is ignored."))
+
(defun convert-hack (string external-format)
"The rfc2388 package is buggy in that it operates on a character
stream and thus only accepts encodings which are 8 bit transparent.
@@ -211,12 +210,6 @@
;; we assume it's not our fault...
(setf (return-code*) +http-bad-request+)))))
-(defmethod dispatch-request (request)
- "Standard implementation of dispatching a request to the appropriate
-handler."
- (funcall (acceptor-request-dispatcher *acceptor*)
- request))
-
(defmethod process-request (request)
"Standard implementation for processing a request. You should not
change or replace this functionality unless you know what you're
@@ -233,7 +226,7 @@
;; skip dispatch if bad request
(when (eql (return-code *reply*) +http-ok+)
;; now do the work
- (dispatch-request request)))))
+ (funcall (acceptor-request-dispatcher *acceptor*) *request*)))))
(when error
(setf (return-code *reply*)
+http-internal-server-error+))
Revision: 4488
Author: edi
URL: http://bknr.net/trac/changeset/4488
Get rid of *within-request-p*
U trunk/thirdparty/hunchentoot/doc/index.xml
U trunk/thirdparty/hunchentoot/packages.lisp
U trunk/thirdparty/hunchentoot/request.lisp
U trunk/thirdparty/hunchentoot/specials.lisp
Modified: trunk/thirdparty/hunchentoot/doc/index.xml
===================================================================
--- trunk/thirdparty/hunchentoot/doc/index.xml 2009-12-14 20:26:57 UTC (rev 4487)
+++ trunk/thirdparty/hunchentoot/doc/index.xml 2009-12-22 22:14:35 UTC (rev 4488)
@@ -953,7 +953,7 @@
a <a href="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_f.htm#function…">function
designator</a> for a unary function. In this case, the
handler will be returned
- by <clix:ref>DISPATCH-EASY-HANDLERS</clix:ref> ,
+ by <clix:ref>DISPATCH-EASY-HANDLERS</clix:ref>,
if <clix:arg>uri</clix:arg> is a string and
the <a href="#script-name">script name</a> of the current
request is <clix:arg>uri</clix:arg>, or
@@ -2897,7 +2897,6 @@
</clix:description>
</clix:function>
- <clix:special-variable name="*tmp-directory*">
<clix:function name='within-request-p'>
<clix:lambda-list>
</clix:lambda-list>
@@ -2907,6 +2906,7 @@
</clix:description>
</clix:function>
+ <clix:special-variable name="*tmp-directory*">
<clix:description>
This should be a pathname denoting a directory where temporary
files can be stored. It is used for <a href="#upload">file
Modified: trunk/thirdparty/hunchentoot/packages.lisp
===================================================================
--- trunk/thirdparty/hunchentoot/packages.lisp 2009-12-14 20:26:57 UTC (rev 4487)
+++ trunk/thirdparty/hunchentoot/packages.lisp 2009-12-22 22:14:35 UTC (rev 4488)
@@ -64,7 +64,6 @@
"*METHODS-FOR-POST-PARAMETERS*"
"*REPLY*"
"*REQUEST*"
- "WITHIN-REQUEST-P"
"*REWRITE-FOR-SESSION-URLS*"
"*SESSION*"
"*SESSION-GC-FREQUENCY*"
Modified: trunk/thirdparty/hunchentoot/request.lisp
===================================================================
--- trunk/thirdparty/hunchentoot/request.lisp 2009-12-14 20:26:57 UTC (rev 4487)
+++ trunk/thirdparty/hunchentoot/request.lisp 2009-12-22 22:14:35 UTC (rev 4488)
@@ -224,8 +224,7 @@
(let (*tmp-files* *headers-sent*)
(unwind-protect
(with-mapped-conditions ()
- (let* ((*request* request)
- (*within-request-p* t))
+ (let* ((*request* request))
(multiple-value-bind (body error)
(catch 'handler-done
(invoke-process-request-with-error-handling
@@ -253,7 +252,7 @@
(defun within-request-p ()
"True if we're in the context of a request, otherwise nil."
- *within-request-p*)
+ (and (boundp '*request*) *request*))
(defun parse-multipart-form-data (request external-format)
"Parse the REQUEST body as multipart/form-data, assuming that its
Modified: trunk/thirdparty/hunchentoot/specials.lisp
===================================================================
--- trunk/thirdparty/hunchentoot/specials.lisp 2009-12-14 20:26:57 UTC (rev 4487)
+++ trunk/thirdparty/hunchentoot/specials.lisp 2009-12-22 22:14:35 UTC (rev 4488)
@@ -234,11 +234,6 @@
(defvar-unbound *request*
"The current REQUEST object while in the context of a request.")
-(defvar *within-request-p* nil
- "True while in the context of a request (while *request* is bound),
-otherwise nil. Outside callers should use exported function
-within-request-p to test this.")
-
(defvar-unbound *reply*
"The current REPLY object while in the context of a request.")
Revision: 4487
Author: edi
URL: http://bknr.net/trac/changeset/4487
Parameters without values
U trunk/thirdparty/drakma/CHANGELOG.txt
U trunk/thirdparty/drakma/doc/index.html
U trunk/thirdparty/drakma/request.lisp
U trunk/thirdparty/drakma/util.lisp
Modified: trunk/thirdparty/drakma/CHANGELOG.txt
===================================================================
--- trunk/thirdparty/drakma/CHANGELOG.txt 2009-12-01 22:49:53 UTC (rev 4486)
+++ trunk/thirdparty/drakma/CHANGELOG.txt 2009-12-14 20:26:57 UTC (rev 4487)
@@ -1,3 +1,5 @@
+Allow for GET/POST parameters without a value (seen on Lotus webservers)
+
Version 1.1.0
2009-12-01
Allowed additional headers to be function designators (suggested by Xiangjun Wu)
Modified: trunk/thirdparty/drakma/doc/index.html
===================================================================
--- trunk/thirdparty/drakma/doc/index.html 2009-12-01 22:49:53 UTC (rev 4486)
+++ trunk/thirdparty/drakma/doc/index.html 2009-12-14 20:26:57 UTC (rev 4487)
@@ -789,7 +789,10 @@
each being a string) which denotes the parameters which are added to
the query part of the URI or (in the case of a POST request) comprise
the request body. (But
-see <a href="#content"><code><i>content</i></code></a> below.) The
+see <a href="#content"><code><i>content</i></code></a> below.)
+The values can also be
+<code>NIL</code> in which case only the name (without an equal sign) is used in
+the query string. The
name/value pairs
are <a
href="http://www.blooberry.com/indexdot/html/topics/urlencoding.htm">URL-encoded</a>
Modified: trunk/thirdparty/drakma/request.lisp
===================================================================
--- trunk/thirdparty/drakma/request.lisp 2009-12-01 22:49:53 UTC (rev 4486)
+++ trunk/thirdparty/drakma/request.lisp 2009-12-14 20:26:57 UTC (rev 4487)
@@ -237,19 +237,20 @@
PARAMETERS is an alist of name/value pairs \(the car and the cdr each
being a string) which denotes the parameters which are added to the
query part of the URL or \(in the case of a POST request) comprise the
-body of the request. (But see CONTENT below.) The name/value pairs
-are URL-encoded using the FLEXI-STREAMS external format
-EXTERNAL-FORMAT-OUT before they are sent to the server unless
-FORM-DATA is true in which case the POST request body is sent as
-`multipart/form-data' using EXTERNAL-FORMAT-OUT. The values of the
-PARAMETERS alist can also be pathnames, open binary input streams,
-unary functions, or lists where the first element is of one of the
-former types. These values denote files which should be sent as part
-of the request body. If files are present in PARAMETERS, the content
-type of the request is always `multipart/form-data'. If the value is
-a list, the part of the list behind the first element is treated as a
-plist which can be used to specify a content type and/or a filename
-for the file, i.e. such a value could look like, e.g.,
+body of the request. (But see CONTENT below.) The values can also be
+NIL in which case only the name \(without an equal sign) is used in
+the query string. The name/value pairs are URL-encoded using the
+FLEXI-STREAMS external format EXTERNAL-FORMAT-OUT before they are sent
+to the server unless FORM-DATA is true in which case the POST request
+body is sent as `multipart/form-data' using EXTERNAL-FORMAT-OUT. The
+values of the PARAMETERS alist can also be pathnames, open binary
+input streams, unary functions, or lists where the first element is of
+one of the former types. These values denote files which should be
+sent as part of the request body. If files are present in PARAMETERS,
+the content type of the request is always `multipart/form-data'. If
+the value is a list, the part of the list behind the first element is
+treated as a plist which can be used to specify a content type and/or
+a filename for the file, i.e. such a value could look like, e.g.,
\(#p\"/tmp/my_file.doc\" :content-type \"application/msword\"
:filename \"upload.doc\").
@@ -406,7 +407,10 @@
(setq proxy (list proxy 80))))
;; make sure we don't get :CRLF on Windows
(let ((*default-eol-style* :lf)
- (file-parameters-p (find-if-not #'stringp parameters :key #'cdr))
+ (file-parameters-p (find-if-not (lambda (thing)
+ (or (stringp thing)
+ (null thing)))
+ parameters :key #'cdr))
parameters-used-p)
(when (and file-parameters-p (not (eq method :post)))
(parameter-error "Don't know how to handle parameters in ~S, as this is not a POST request."
Modified: trunk/thirdparty/drakma/util.lisp
===================================================================
--- trunk/thirdparty/drakma/util.lisp 2009-12-01 22:49:53 UTC (rev 4486)
+++ trunk/thirdparty/drakma/util.lisp 2009-12-14 20:26:57 UTC (rev 4487)
@@ -111,18 +111,19 @@
(defun alist-to-url-encoded-string (alist external-format)
"ALIST is supposed to be an alist of name/value pairs where both
-names and values are strings. This function returns a string where
-this list is represented as for the content type
-`application/x-www-form-urlencoded', i.e. the values are URL-encoded
-using the external format EXTERNAL-FORMAT, the pairs are joined with a
-#\\& character, and each name is separated from its value with a #\\=
-character."
+names and values are strings \(or, for values, NIL). This function
+returns a string where this list is represented as for the content
+type `application/x-www-form-urlencoded', i.e. the values are
+URL-encoded using the external format EXTERNAL-FORMAT, the pairs are
+joined with a #\\& character, and each name is separated from its
+value with a #\\= character. If the value is NIL, no #\\= is used."
(with-output-to-string (out)
(loop for first = t then nil
for (name . value) in alist
unless first do (write-char #\& out)
- do (format out "~A=~A"
+ do (format out "~A~:[~;=~A~]"
(url-encode name external-format)
+ value
(url-encode value external-format)))))
(defun default-port (uri)
Revision: 4486
Author: edi
URL: http://bknr.net/trac/changeset/4486
::rollseyes::
U trunk/thirdparty/chunga/doc/index.html
Modified: trunk/thirdparty/chunga/doc/index.html
===================================================================
--- trunk/thirdparty/chunga/doc/index.html 2009-12-01 22:48:48 UTC (rev 4485)
+++ trunk/thirdparty/chunga/doc/index.html 2009-12-01 22:49:53 UTC (rev 4486)
@@ -548,7 +548,7 @@
<p><br>[Function]<br><a class=none name='token-char-p'><b>token-char-p</b> <i>char</i> => <i>generalized-boolean</i></a>
<blockquote><br>
-Returns a true value if the Lisp character <code><i>CHAR</i></code> is a token constituent
+Returns a true value if the Lisp character <code><i>char</i></code> is a token constituent
according to
<a href="http://www.rfc.net/rfc2616.html">RFC 2616</a>.