From edi at agharta.de Fri Oct 6 12:02:44 2006 From: edi at agharta.de (Edi Weitz) Date: Fri, 06 Oct 2006 14:02:44 +0200 Subject: [drakma-devel] New Chunga version 0.2.0 Message-ID: ChangeLog: Version 0.2.0 2006-10-06 Only wrap inner stream with flexi stream if really needed Download: http://weitz.de/files/chunga.tar.gz Cheers, Edi. From edi at agharta.de Fri Oct 6 23:53:09 2006 From: edi at agharta.de (Edi Weitz) Date: Sat, 07 Oct 2006 01:53:09 +0200 Subject: [drakma-devel] New version 0.5.1 Message-ID: ChangeLog: Version 0.5.1 2006-10-07 Take Content-Encoding header into account (due to a bug report by Gregory Tod) Download: http://weitz.de/files/drakma.tar.gz Cheers, Edi. From edi at agharta.de Sun Oct 8 21:57:54 2006 From: edi at agharta.de (Edi Weitz) Date: Sun, 08 Oct 2006 23:57:54 +0200 Subject: [drakma-devel] New version 0.5.2 Message-ID: ChangeLog: Version 0.5.2 2006-10-08 Adher to user-provided content length if FORM-DATA is true Download: http://weitz.de/files/drakma.tar.gz Cheers, Edi. From edi at agharta.de Wed Oct 11 14:02:20 2006 From: edi at agharta.de (Edi Weitz) Date: Wed, 11 Oct 2006 16:02:20 +0200 Subject: [drakma-devel] New version 0.5.3 (Was: [Lispweb] Announcement: Drakma) In-Reply-To: <87r6xf3v2g.fsf@freemail.hu> (Magnus Henoch's message of "Wed, 11 Oct 2006 14:17:59 +0200") References: <87r6xf3v2g.fsf@freemail.hu> Message-ID: On Wed, 11 Oct 2006 14:17:59 +0200, Magnus Henoch wrote: > I tested it with CLISP (CVS version, slightly post-2.40). I used > the examples on the web page; it worked fine until the binary > example. In line 121 of request.lisp, READ-SEQUENCE for some reason > extracts characters from STREAM, which it then fails to put into the > byte array RESULT: > > SYSTEM::STORE: #\G does not fit into #(0 0 0 0 0 0 0 0 0 0 ...), bad type > [Condition of type SIMPLE-TYPE-ERROR] > > The TEXTP parameter to READ-BODY is NIL, and > (flexi-streams:flexi-stream-element-type stream) returns CHARACTER. Hmm, CLISP certainly tries hard to be different from the pack... :) Anyway, please try the new version 0.5.3 and see if it makes a difference. Thanks for the report, Edi. From vodonosov at mail.ru Tue Oct 24 03:05:04 2006 From: vodonosov at mail.ru (Anton Vodonosov) Date: Tue, 24 Oct 2006 06:05:04 +0300 Subject: [drakma-devel] Error when chunked transfer encoding is used on clisp Message-ID: Hi! I've decided to repost this messsage here, because the message I've posted to lispweb mailing list contains stack backtrace produced by slime. But, as it turned out, slime debugger doesn't work well with clisp. The problem is that the http-request function fails when it's used for server with chunker transfer encoding. For example, all the following calls fail: (http-request "http://www.phpsecurepages.com/test/test.php") (http-request "http://bcheck.scanit.be/bcheck/") (http-request "http://google.com") (http-request "http://weitz.de/drakma/") whereas following cals work fine: (http-request "http://zappa.com/favicon.ico") (http-request "http://www.jalat.com/blogs/lisp?id=3") (http-request "http://www.lispworks.com/") (http-request "http://meme.b9.com/login.html") All the failed calls use cunked transfer encoding; all successful - don't use chunked transfer encoding. The error is always the same: SYSTEM::STORE: #\< does not fit into #(0 0 0 0 0 0 0 0 0 0 ...), bad type See backtrace bellow. Also, consider an example: ;; in order to use the ;; chunked-stream-input-stream ;; function (in-package :chunga) (setq *stream* (drakma:http-request "http://weitz.de/drakma/" :want-stream t)) *stream* => # (flexi-streams:flexi-stream-stream *stream*) => # (chunked-stream-input-stream (flexi-streams:flexi-stream-stream *stream*)) => # (flexi-streams:flexi-stream-stream (chunked-stream-input-stream (flexi-streams:flexi-stream-stream *stream*))) => # As far as I understand, chunked streams expect underlying stream to be binary. But in this case, chunked input stream has flexi stream as underlying stream. ----------------------------------------- Backtrace for the error signaled by (http-request "http://weitz.de/drakma/") ----------------------------------------- The error itself: #: standard object type: SIMPLE-TYPE-ERROR 0 [$DATUM]: #\< 1 [$EXPECTED-TYPE]: (UNSIGNED-BYTE 8) 2 [$FORMAT-CONTROL]: "~S: ~S does not fit into ~S, bad type " 3 [$FORMAT-ARGUMENTS]: (SYSTEM::STORE #\< #) ------------------------------------------- Backtrace: ... <11> # 1 frame binding variables (~ = dynamically): | ~ SYSTEM::*PRIN-STREAM* <--> # frame binding variables (~ = dynamically): | ~ *PRINT-READABLY* <--> NIL frame binding variables (~ = dynamically): | ~ *PRINT-ESCAPE* <--> T - # - #(0 0 0 0 0 ...) <12> # 3 - #\< - 0 - #(8 # # # # # # # # # # # # # # #) - 3566 - 0 - # - #(0 0 0 0 0 ...) <13> # - # - (UNSIGNED-BYTE 8) - CHARACTER - # - 3566 - 0 - (:START 0 :END 3566) - # - #(0 0 0 0 0 ...) <14> # - # - 3566 - # - #(#(#(NIL #) #) #) frame binding variables (~ = dynamically): | ~ CHUNGA::*CURRENT-ERROR-FUNCTION* <--> # - #(#(NIL #) #) - #(NIL #) - # - # <15> # <16> # - # - # <17> # <18> # - NIL - NIL - # <19> # - # - NIL - # <20> # - # - #(0 1 2 3 4 5 ... 253 254 255) - # <21> # - # <22> # - # - :LF - #(#(NIL #) # :ISO-8859-1) - #(NIL #) - # - # <23> # <24> # - NIL - 0 - # - 8192 - 0 - "^@^@^@^@^@..." - # <25> # - # - # - NIL - 8192 - 0 - "^@^@^@^@^@..." - # <26> # <27> # - 8192 - 0 - # - (0 8192) - "^@^@^@^@^@..." - # <28> # <29> # - # - "^@^@^@^@^@..." - 8192 - 0 - # - "^@^@^@^@^@..." <30> # - # - CHARACTER - CHARACTER - # - # - # - NIL - # - "^@^@^@^@^@ <31> # - NIL - 0 - "" - "^@^@^@^@^@ - T - CHARACTER - NIL - #(NIL ((:DATE . "Tue, 24 Oct 2006 02:51:03 GMT") (:SERVER . "Apache") (:CONNECTION . "close") (:TRANSFER-ENCODING . "chunked") (:CONTENT-TYPE . "text/html; charset=iso-8859-1"))) - # - # - T - ((:DATE . "Tue, 24 Oct 2006 02:51:03 GMT") (:SERVER . "Apache") (:CONNECTION . "close") (:TRANSFER-ENCODING . "chunked") (:CONTENT-TYPE . "text/html; charset=iso-8859-1")) - # <32> # - NIL - # - NIL - ((:DATE . "Tue, 24 Oct 2006 02:51:03 GMT") (:SERVER . "Apache") (:CONNECTION . "close") (:TRANSFER-ENCODING . "chunked") (:CONTENT-TYPE . "text/html; charset=iso-8859-1")) - 200 - :HTTP/1.1 - # - NIL - NIL <33> # - # - # - #(#(#(NIL # NIL :HTTP/1.1 :GET NIL NIL NIL 5 (:GET :HEAD) NIL :LATIN-1 :LATIN-1 NIL NIL) # T) #) unwind-protect frame - #(#(NIL # NIL :HTTP/1.1 :GET NIL NIL NIL 5 (:GET :HEAD) NIL :LATIN-1 :LATIN-1 NIL NIL) # T) frame binding variables (~ = dynamically): | ~ FLEXI-STREAMS:*DEFAULT-EOL-STYLE* <--> :LF - NIL - :LF compiled block frame for HTTP-REQUEST - NIL - #(NIL # NIL :HTTP/1.1 :GET NIL NIL NIL 5 (:GET :HEAD) NIL :LATIN-1 :LATIN-1 NIL NIL) - # - NIL - # - # - # - # - T - NIL - # - # - # - # - NIL - NIL - "*/*" - :DRAKMA - NIL - # - NIL - NIL - "application/x-www-form-urlencoded" - NIL - NIL - # - # - # - NIL - "http://weitz.de/drakma/" <34> # - # EVAL frame for form (HTTP-REQUEST "http://weitz.de/drakma/") frame binding environments VAR_ENV <--> NIL FUN_ENV <--> NIL BLOCK_ENV <--> NIL GO_ENV <--> NIL DECL_ENV <--> ((DECLARATION OPTIMIZE DECLARATION)) <35> ... Regards, -Anton From edi at agharta.de Thu Oct 26 01:29:31 2006 From: edi at agharta.de (Edi Weitz) Date: Thu, 26 Oct 2006 03:29:31 +0200 Subject: [drakma-devel] New Chunga version 0.2.1 (Was: Error when chunked transfer encoding is used on clisp) In-Reply-To: (Anton Vodonosov's message of "Tue, 24 Oct 2006 06:05:04 +0300") References: Message-ID: On Tue, 24 Oct 2006 06:05:04 +0300, "Anton Vodonosov" wrote: > The problem is that the http-request function fails when it's used > for server with chunker transfer encoding. Thanks for the report. It seems CLISP again needs special treatment here. Please try with the new Chunga release. Cheers, Edi. From vodonosov at mail.ru Thu Oct 26 03:46:55 2006 From: vodonosov at mail.ru (Anton Vodonosov) Date: Thu, 26 Oct 2006 06:46:55 +0300 Subject: [drakma-devel] drakma works with clisp (Was: New Chunga version 0.2.1 (Was: Error when chunked transfer encoding is used on clisp)) In-Reply-To: Message-ID: Drakma works well on clisp with the chunga 0.2.1 I've tried all the examples from http://weitz.de/drakma/ except for https and authorization. -Anton -----Original Message----- From: Edi Weitz [mailto:edi at agharta.de] Sent: Thursday, October 26, 2006 4:30 AM To: Anton Vodonosov Cc: drakma-devel at common-lisp.net; drakma-announce at common-lisp.net Subject: New Chunga version 0.2.1 (Was: Error when chunked transfer encoding is used on clisp) On Tue, 24 Oct 2006 06:05:04 +0300, "Anton Vodonosov" wrote: > The problem is that the http-request function fails when it's used > for server with chunker transfer encoding. Thanks for the report. It seems CLISP again needs special treatment here. Please try with the new Chunga release. Cheers, Edi.