[drakma-devel] Couple of problems

Ivan Toshkov ivan at toshkov.org
Sun Sep 24 06:41:04 UTC 2006


Hi,

First of all, thank you Edi Weitz for your excellent libraries.  I
find them simple to use, well thought out, and with excellent
documentation.  Again, a big thank you.  And thanks to whoever is
working on porting Drakma.

I found a couple of problems:

Drakma cannot receive cookies from localhost.  After a short
investigation I found that the problem was with the method
VALID-COOKIE-DOMAIN-P, which insist to have at least 2 dots in the
normalized domain name.  As a workaround I used 127.0.0.1 instead of
localhost.

The other problem is with an incomplete implementation of
flexi-streams under CMUCL.  The call:

> (drakma:http-request "http://www.google.com/" :parameters '(("q" . "something")))

works normally, but

> (drakma:http-request "http://www.google.com/search" :parameters '(("q" . "something")))

gives:

No matching method for the generic function
#<STANDARD-GENERIC-FUNCTION INPUT-STREAM-P (2) {58E17501}>, when called with
arguments (#<FLEXI-STREAMS::VECTOR-OUTPUT-STREAM {5834F8FD}>).
   [Condition of type PCL::NO-APPLICABLE-METHOD-ERROR]

  0: ("DEFMETHOD NO-APPLICABLE-METHOD (T)" #<#1=unused-arg> #<#1#>
#<STANDARD-GENERIC-FUNCTION INPUT-STREAM-P (2) {58E17501}>
(#<FLEXI-STREAMS::VECTOR-OUTPUT-STREAM {5834F8FD}>))
  1: (FLEXI-STREAMS:MAKE-FLEXI-STREAM
#<FLEXI-STREAMS::VECTOR-OUTPUT-STREAM {5834F8FD}> :EXTERNAL-FORMAT
:LATIN-1)
  2: (FLEXI-STREAMS:STRING-TO-OCTETS "q" :EXTERNAL-FORMAT :LATIN-1 :START ...)
  3: (DRAKMA::URL-ENCODE "q" :LATIN-1)
  4: (DRAKMA::ALIST-TO-URL-ENCODED-STRING (("q" . "something")) :LATIN-1)
  5: (DRAKMA:HTTP-REQUEST #<URI http://www.google.com/search>
:PARAMETERS (("q" . "something")))

I don't have time at the moment to see if anything else is missing and
to give patches.  For this case though the workaround seems to be as
simple as:

(defmethod input-stream-p ((s flexi-streams::vector-output-stream)) nil)


Cheers,
Ivan

P.S.  I did a clean ASDF-install on Drakma and it's dependencies.  I
can give the precise versions if needed.



More information about the Drakma-devel mailing list