I am having trouble with Clozure CL. I am not sure this is the right
mailing list as it
seems to be a CCL problem (unexpected end-of-file). This same request works
with LW 5.0.1
and SBCL 1.0.15 on the same machine. CCL also works with other urls like "
https://bmo.com".
The failing url is being served by an apache web server. I have noticed
similiar problems have
been posted to this mailing list. (setting chunga:*accept-bogus-eols* does
not help).
CL-USER> (lisp-implementation-version)
"Version 1.2-r9226-RC1 (LinuxX8664)"
CL-USER>
CL-USER> (drakma:http-request "https://esqa.moneris.com")
Unexpected end of file on #<SSL-STREAM for 4>
[Condition of type END-OF-FILE]
Restarts:
0: [ABORT] Return to SLIME's top level.
1: [ABORT-BREAK] Reset this process
2: [ABORT] Kill this process
Backtrace:
0: (READ-BYTE #<SSL-STREAM for 4> 'T 'NIL)
1: (#<CCL::STANDARD-KERNEL-METHOD STREAM-READ-VECTOR
(CCL::BINARY-INPUT-STREAM
T
T
T)> #<SSL-STREAM for
4> #(60 72 84 77 76 62 10 60 72 69 ...) 0 2355)
2: (READ-SEQUENCE #(60 72 84 77 76 62 10 60 72 69 ...) #<SSL-STREAM for 4>
':START 0 ':END 2355)
3: (READ-SEQUENCE #(60 72 84 77 76 62 10 60 72 69 ...)
#<CHUNGA:CHUNKED-IO-STREAM #x30004141A8FD> ':START 0 ':END 2355)
4: ((:INTERNAL FLEXI-STREAMS::FILL-BUFFER
(TRIVIAL-GRAY-STREAMS:STREAM-READ-SEQUENCE
(FLEXI-STREAMS:FLEXI-INPUT-STREAM T T T))) 2355)
5: (#<STANDARD-METHOD TRIVIAL-GRAY-STREAMS:STREAM-READ-SEQUENCE
(FLEXI-STREAMS:FLEXI-INPUT-STREAM
T
T
T)>
#<FLEXI-STREAMS:FLEXI-IO-STREAM #x30004129C14D>
6: (CCL::%%STANDARD-COMBINED-METHOD-DCODE '((#<STANDARD-METHOD
TRIVIAL-GRAY-STREAMS:STREAM-READ-SEQUENCE :BEFORE
(FLEXI-STREAMS:FLEXI-IO-STREAM
T
T
T)>)
NIL
#<STANDARD-METHOD TRIVIAL-GRAY-STREAMS:STREAM-READ-SEQUENCE
(FLEXI-STREAMS:FLEXI-INPUT-STREAM
T
T
T)>)
17575205018776)
7: (READ-SEQUENCE <edited>
8: (DRAKMA::READ-BODY #<FLEXI-STREAMS:FLEXI-IO-STREAM #x30004129C14D>
'((:DATE . "Tue, 10 Jun 2008 04:15:25 GMT") (:SERVER . "Apache")
(:LAST-MODIFIED . "Thu, 08 Nov 2007 15:41:34 GMT")
(:ETAG . "\"42951-931-b3656780\"") (:ACCEPT-RANGES . "bytes")
(:CONTENT-LENGTH . "2353") (:CONNECTION . "close")
(:CONTENT-TYPE . "text/html; charset=UTF-8")) 'T #<FLEXI-UTF-8-FORMAT
(:UTF-8 :EOL-STYLE :LF) #x30004129BCCD>)
9: ((:INTERNAL DRAKMA::FINISH-REQUEST DRAKMA:HTTP-REQUEST) 'NIL 'NIL)
10: (DRAKMA:HTTP-REQUEST #<URI https://esqa.moneris.com>)
11: (CCL::CALL-CHECK-REGS 'DRAKMA:HTTP-REQUEST "https://esqa.moneris.com")
12: (CCL::RUN-PROCESS-INITIAL-FORM #<PROCESS worker(7) [Active]
#x30004130E5FD> '(#<COMPILED-LEXICAL-CLOSURE (:INTERNAL
CCL::%PROCESS-RUN-FUNCTION) #x30004130E48F>))
13: ((:INTERNAL CCL::%PROCESS-PRESET-INTERNAL) #<PROCESS worker(7) [Active]
#x30004130E5FD> '(#<COMPILED-LEXICAL-CLOSURE (:INTERNAL
CCL::%PROCESS-RUN-FUNCTION) #x30004130E48F>))
14: ((:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION))
It works!
Thanks a lot!
On 6/5/08, drakma-devel-request(a)common-lisp.net <
drakma-devel-request(a)common-lisp.net> wrote:
>
> Send drakma-devel mailing list submissions to
> drakma-devel(a)common-lisp.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel
> or, via email, send a message with subject or body 'help' to
> drakma-devel-request(a)common-lisp.net
>
> You can reach the person managing the list at
> drakma-devel-owner(a)common-lisp.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of drakma-devel digest..."
>
>
> Today's Topics:
>
> 1. Handling chunked content (Nico Garcia Belmonte)
> 2. Re: Handling chunked content (Edi Weitz)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 5 Jun 2008 02:43:48 +0200
> From: "Nico Garcia Belmonte" <philogb(a)gmail.com>
> Subject: [drakma-devel] Handling chunked content
> To: drakma-devel(a)common-lisp.net
> Message-ID:
> <4e2f5dc00806041743p7b2e6d29kc36dd8e84d4630ff(a)mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> ...I'm kind of a newbie, so please forgive me if I make stupid questions.
> I've been using drakma to request html pages and everything seems to work
> fine.
>
> I'm now using drakma to make a request to the new youtube json api, and I
> get chunked content:
>
> (http-request "
>
> http://gdata.youtube.com/feeds/api/videos/-/Music/?max-results=10&vq=bush&a…
> ")
>
> ...chunked content...
>
> ((:CONTENT-TYPE . "application/json; charset=UTF-8")
> (:CACHE-CONTROL . "max-age=0, must-revalidate, no-transform, private")
> (:GDATA-VERSION . "1.0") (:LAST-MODIFIED . "Thu, 05 Jun 2008 00:20:27
> GMT")
> (:TRANSFER-ENCODING . "chunked") (:DATE . "Thu, 05 Jun 2008 00:20:27
> GMT")
> (:SERVER . "GFE/1.3") (:CONNECTION . "Close"))
> #<PURI:URI
>
> http://gdata.youtube.com/feeds/api/videos/-/Music/?max-results=10&vq=bush&a…
> >
> #<FLEXI-STREAMS:FLEXI-IO-STREAM {B90E249}>
>
> The thing is that I need it to be a string in order to decode to json
> format
> using the cl-json lisp package.
> I tried changing the external-output parameter without any good results.
>
> Do you have some advice on how I could serialize this content?
>
> Thanks at advanced!
>
> Your library is great!
>
> Nico.
>
> --
> I would never die for my beliefs because I might be wrong.
>
> Bertrand Russell
>
Hi,
...I'm kind of a newbie, so please forgive me if I make stupid questions.
I've been using drakma to request html pages and everything seems to work
fine.
I'm now using drakma to make a request to the new youtube json api, and I
get chunked content:
(http-request "
http://gdata.youtube.com/feeds/api/videos/-/Music/?max-results=10&vq=bush&a…
")
...chunked content...
((:CONTENT-TYPE . "application/json; charset=UTF-8")
(:CACHE-CONTROL . "max-age=0, must-revalidate, no-transform, private")
(:GDATA-VERSION . "1.0") (:LAST-MODIFIED . "Thu, 05 Jun 2008 00:20:27 GMT")
(:TRANSFER-ENCODING . "chunked") (:DATE . "Thu, 05 Jun 2008 00:20:27 GMT")
(:SERVER . "GFE/1.3") (:CONNECTION . "Close"))
#<PURI:URI
http://gdata.youtube.com/feeds/api/videos/-/Music/?max-results=10&vq=bush&a…
>
#<FLEXI-STREAMS:FLEXI-IO-STREAM {B90E249}>
The thing is that I need it to be a string in order to decode to json format
using the cl-json lisp package.
I tried changing the external-output parameter without any good results.
Do you have some advice on how I could serialize this content?
Thanks at advanced!
Your library is great!
Nico.
--
I would never die for my beliefs because I might be wrong.
Bertrand Russell