[drakma-devel] Re: [slime-devel] Problem with pipelined requests

Anton Vodonosov vodonosov at mail.ru
Sat Jul 7 10:13:56 UTC 2007


Hi Didier. I've tried you code for google.com - works for me.

It is unlikely from my point of view that the problem is in 
drakma. Looks like slime can't print you values. There are plenty
of ways you can isolate the root of the problem.

Try to save values returned by http-request in variables to
avoid printing them by slime:

(defun foo ()
 (multiple-value-bind
       (body status headers from-uri from-stream must-close reason)
     (http-request "http://google.com")
   (setq b body h headers)
   nil
   ;;(values body headers)
))

Then you may just evaluate b or h and see what happens.
If the printing of srting assigned to b leads to troubles,
you may find problematic part of the string place by printing
only part of string (splitting it to halves or just print it 
char by char)

You also may try you code without slime, running it directly
in you lisp.

Or you can use :force-binary and then save returned array 
to file and then alanyze it.

Regards,
-Anton


Didier Verna:

> 
>        Hello,
> 
> I think this question has more to do with Slime, but I'm Cc'ing Drakma
> because it might be related. I'm in a situation where
> drakma:http-request seems to get stuck as soon as I want to retreive the
> BODY of a request. To simplify consider something like this:
> 
> (defun foo ()
>   (multiple-value-bind
> 	(body status headers from-uri from-stream must-close reason)
>       (http-request ...)
>     (values body headers)))
> 
> With *header-stream* set to standard output, I can see the transaction
> going on until the end, but then the Slime repl doesn't return. I can
> type comma and then slime commands, C-c C-c has no effect, and if I type
> something in the repl buffer, I get this on the XEmacs minibuffer
> window:
> 
> ; pipelined request... (swank:listener-eval "
> ")
> 
> (note the CR)
> 
> 
> On the contrary, if I comment out the (values ...) form in my function,
> the request completes and Slime gives me the prompt back.
> 
> 
> Any hint on what's going on would be appreciated. And BTW, how do I get
> of such a situation in Slime ?
> 
> 
> Thanks !
> 





More information about the Drakma-devel mailing list