On Thu, 29 May 2008 17:33:05 -0400, "Andrei Stebakov" <[EMAIL PROTECTED]> wrote:

> I wonder if response should be nil when content-length is 0?

The first return value of HTTP-REQUEST isn't necessarily a string, it
can also be an array of octets or a stream, so there's no particular
reason to assume that you'll get a string of length zero if the
content length is zero.  But you can, no matter if it's a string, an
octet array, or NIL always check with LENGTH first.

One could argue that a zero-length array would be more appropriate,
but I think returning NIL in this case is more Lisp-y.

Having said that, I realize that NIL isn't even mentioned as a
potential return value, so I should probably add this to the
documentation.
_______________________________________________
drakma-devel mailing list
drakma-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel

Reply via email to