[drakma-devel] http-request error...

Andrei Stebakov lispercat at gmail.com
Fri Oct 12 04:05:46 UTC 2007


I run across this error time after time but it's really hard to reproduce
but I can replicate exactly the same backtrace of the problem if instead of
some valid http domain I choose any fake one.
If I run:
(drakma:http-request
 "http://some-fake-domain.com"
 :method :get
 :parameters `(("param1" . "text")))

The backtrace will be:

The value 0
is not of type
  (OR (SINGLE-FLOAT (0.0)) (DOUBLE-FLOAT (0.0d0)) (INTEGER 1)).
   [Condition of type TYPE-ERROR]

Restarts:
 0: [ABORT] Return to SLIME's top level.
 1: [ABORT] Exit debugger, returning to top level.

Backtrace:
  0: (RANDOM 0)
  1: (USOCKET::GET-RANDOM-HOST-BY-NAME "some-fake-domain.com")
  2: (USOCKET:SOCKET-CONNECT "some-fake-domain.com" 80)
  3: (DRAKMA:HTTP-REQUEST "http://some-fake-domain.com")
  4: (SB-INT:SIMPLE-EVAL-IN-LEXENV
      (DRAKMA:HTTP-REQUEST "http://some-fake-domain.com" :METHOD :GET
                           :PARAMETERS '(("param1" . "text")))
      #<NULL-LEXENV>)
  5: ((LAMBDA ()))

In my case it looks like sometimes even for the real domain it calls (RANDOM
0) which gives this log.
Even if the domain is wrong do you think it should throw an exception?
I use SBCL 1.0.5. with the latest drakma and usocket (usocket-0.3.2).


Thank you,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/drakma-devel/attachments/20071012/b16b621b/attachment.html>


More information about the Drakma-devel mailing list