Re: New version 0.5.3 (Was: Announcement: Drakma)

"Anton Vodonosov" <[email protected]> Mon, 23 Oct 2006 18:08:11 +0300
Newsgroups gmane.lisp.web
Message-ID <[email protected]>
Hi,

I'm trying Drakma version 0.5.3 on windows + clisp.

Following calls work fine:
(http-request "http://lisp.org/index.html")
(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")


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/")

One common thing about failing calls is that
chunked transfer encoding is used for all of them.

All successful calls 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
   [Condition of type SIMPLE-TYPE-ERROR]

Restarts:
  0: [ABORT-REQUEST] Abort handling SLIME request.
  1: [ABORT] ABORT

Backtrace:
  0: #<COMPILED-FUNCTION READ-SEQUENCE>
  1: #<COMPILED-FUNCTION #:|86 143 (DEFMETHOD FILL-BUFFER (#) ...)-9-1-1|>
  2: #<COMPILED-FUNCTION #:|145 156 (DEFMETHOD STREAM-READ-BYTE (#)
...)-10-1-1|>
  3: #<SYSTEM-FUNCTION READ-BYTE>
  4: #<COMPILED-FUNCTION FLEXI-STREAMS::READ-BYTE*>
  5: #<COMPILED-FUNCTION FLEXI-STREAMS::READ-CHAR-8-BIT>
  6: #<COMPILED-FUNCTION FLEXI-STREAMS::GET-CHAR-CODE>
  7: #<COMPILED-FUNCTION #:|221 275 (DEFMETHOD STREAM-READ-CHAR (#)
...)-11-1-1|>
  8: #<COMPILED-FUNCTION #:|285 311 (DEFMETHOD STREAM-READ-SEQUENCE (#
SEQUENCE START ...) ...)-13-1-1-1|>
  9: #<COMPILED-FUNCTION #:|285 311 (DEFMETHOD STREAM-READ-SEQUENCE (#
SEQUENCE START ...) ...)-13-1-1|>
 10: #<COMPILED-FUNCTION #:|30 105 (PROGN (DEFMETHOD
GRAY:STREAM-READ-BYTE-SEQUENCE # ...) (DEFMETHOD
GRAY:STREAM-WRITE-BYTE-SEQUENCE # ...) ...)-11-3-1-1|>
 11: #<SYSTEM-FUNCTION EXT:READ-CHAR-SEQUENCE>
 12: #<COMPILED-FUNCTION READ-SEQUENCE>
 13: #<COMPILED-FUNCTION DRAKMA::READ-BODY>
 14: #<COMPILED-FUNCTION DRAKMA::HTTP-REQUEST-FINISH-REQUEST>
 15: #<COMPILED-FUNCTION HTTP-REQUEST>
 16: #<COMPILED-FUNCTION DRAKMA::HTTP-REQUEST-FINISH-REQUEST>
 17: #<COMPILED-FUNCTION HTTP-REQUEST>
 18: #<SYSTEM-FUNCTION EVAL>
 19: #<COMPILED-FUNCTION SWANK::INTERACTIVE-EVAL-1>
--more--

I'm not sure, if it's useful, but here is an example:

(setq *stream* (http-request "http://bcheck.scanit.be/bcheck/" :want-stream
t))
(stream-element-type *stream*) => CHARACTER

after that both
(read-sequence  (make-array 5 :element-type 'character) *stream*)
and
(read-char *stream*)
fails with the above error.


Subsequent (read-char *stream*) returns #\Null.

Regards,
-Anton