[drakma-devel] drakma causes lisp connection close unexpectedly

I'm starting to use Drakma in a program of mine, and it seems to work fine for me except in one strange case. I was trying to retrieve a page, with (drakma:http-request "http://cesa.iust.ac.ir/"), that I got "Lisp connection closed unexpectedly: exited abnormally with code 256". I set *header-stream* to see what's happening. This is the result: GET / HTTP/1.1 Host: cesa.iust.ac.ir User-Agent: Drakma/0.7.0 (SBCL 1.0.3; Linux; 2.6.20-15-generic; http://weitz.de/drakma/) Accept: */* Connection: close HTTP/1.1 302 Found Connection: close Date: Mon, 30 Apr 2007 22:52:19 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Location: /Default.aspx?AspxAutoDetectCookieSupport=1 Set-Cookie: AspxAutoDetectCookieSupport=1; path=/ Cache-Control: private Content-Type: text/html GET /Default.aspx?AspxAutoDetectCookieSupport=1 HTTP/1.1 Host: cesa.iust.ac.ir User-Agent: Drakma/0.7.0 (SBCL 1.0.3; Linux; 2.6.20-15-generic; http://weitz.de/drakma/) Accept: */* Connection: close HTTP/1.1 302 Found Connection: close Date: Mon, 30 Apr 2007 22:52:28 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Location: /(X(1)S(rmofw345wvkjbzjz54jnyu45))/Default.aspx?AspxAutoDetectCookieSupport=1 Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 194 GET /(X(1)S(rmofw345wvkjbzjz54jnyu45))/Default.aspx?AspxAutoDetectCookieSupport=1 HTTP/1.1 Host: cesa.iust.ac.ir User-Agent: Drakma/0.7.0 (SBCL 1.0.3; Linux; 2.6.20-15-generic; http://weitz.de/drakma/) Accept: */* Connection: close HTTP/1.1 200 OK Connection: close Date: Mon, 30 Apr 2007 22:52:34 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 72459 Other web pages I have tested work fine, but this is the one page I'm going to work with. Any ideas? Thanks. Homayoon, (new-comer)

Mostafa Razavi <hom.sepanta@gmail.com> writes:
I'm starting to use Drakma in a program of mine, and it seems to work fine for me except in one strange case. I was trying to retrieve a page, with (drakma:http-request "http://cesa.iust.ac.ir/"), that I got "Lisp connection closed unexpectedly: exited abnormally with code 256".
That call works for me on LispWorks. However, I've had issues with printing debugging output in my environment. I use SLIME and LispWorks and I can get into situations where I print characters to the repl/interaction buffer and that kills my LispWorks image. So, can we have a little more detail? How are you running sbcl? Is it inside SLIME? Are you trying to print some of the data out to your screen? If so, can you try (length (drakma:http-request "http://cesa.iust.ac.ir/")) and see if that works? For me on LispWorks I get: (length (drakma:http-request "http://cesa.iust.ac.ir/")) => 71253 When I print out the data, I get utf-8 data in a language I can't read (perhaps Farsi, but I really have no idea!). Cheers, Chris Dean

On Tue, 01 May 2007 02:27:12 +0330, Mostafa Razavi <hom.sepanta@gmail.com> wrote:
I'm starting to use Drakma in a program of mine, and it seems to work fine for me except in one strange case. I was trying to retrieve a page, with (drakma:http-request "http://cesa.iust.ac.ir/"), that I got "Lisp connection closed unexpectedly: exited abnormally with code 256".
As Chris already said, this looks very much like a SLIME issue. Actually, I'd be willing to bet that it is one... :) Works fine for me with LispWorks on Windows, but the page contains a lot characters I don't know - maybe Arabic. HTH, Edi.

I am sorry, I should have included more details. Yes, I use SLIME, and you're right. I tried it from SBCL repl and it worked. Actually, it seems when SLIME tries to print the result it runs into problem. Maybe, Persian text causes this problem. Anyway, thanks for you replies. Next time, I'll try to do more tests before posting here. Homayoon Edi Weitz wrote:
On Tue, 01 May 2007 02:27:12 +0330, Mostafa Razavi <hom.sepanta@gmail.com> wrote:
I'm starting to use Drakma in a program of mine, and it seems to work fine for me except in one strange case. I was trying to retrieve a page, with (drakma:http-request "http://cesa.iust.ac.ir/"), that I got "Lisp connection closed unexpectedly: exited abnormally with code 256".
As Chris already said, this looks very much like a SLIME issue. Actually, I'd be willing to bet that it is one... :)
Works fine for me with LispWorks on Windows, but the page contains a lot characters I don't know - maybe Arabic.
HTH, Edi. _______________________________________________ drakma-devel mailing list drakma-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel

On 5/1/07, Mostafa Razavi <hom.sepanta@gmail.com> wrote:
I am sorry, I should have included more details. Yes, I use SLIME, and you're right. I tried it from SBCL repl and it worked. Actually, it seems when SLIME tries to print the result it runs into problem. Maybe, Persian text causes this problem. Anyway, thanks for you replies. Next time, I'll try to do more tests before posting here.
You may find http://nolan.eakins.net/node/150 (besides Slime's docs) useful for configuring a Unicode-friendly Emacs/Slime/Lisp environment. Andras
participants (4)
-
Andras Simon
-
Chris Dean
-
Edi Weitz
-
Mostafa Razavi