[drakma-devel] utf-8 question
Edi Weitz
edi at agharta.de
Sat Sep 29 14:10:17 UTC 2007
On Sat, 29 Sep 2007 00:04:59 -0700 (PDT), Ross Jekel <ross at sourcelabs.com> wrote:
> I'm using Drakma 0.10.1 with AllegroCL 8.1. When I make an
> http-request to get a wsdl file which returns the response header:
>
> Content-Type: text/xml; charset=utf-8
>
> the contents returned are a vector of octets. I got the impression
> from the examples that it would autosense the content type and
> return a decoded-string. Am I doing something wrong?
No, it should behave as you expect. This what I get (LWW 5.0.2):
CL-USER 1 > (setq drakma:*header-stream* *standard-output*)
#<EDITOR::RUBBER-STREAM #<EDITOR:BUFFER CAPI interactive-pane 2> 2190100B>
CL-USER 2 > (drakma:http-request "http://zappa.agharta.de/test.xml")
GET /test.xml HTTP/1.1
Host: zappa.agharta.de
User-Agent: Drakma/0.10.1 (LispWorks 5.0.2; Windows NT; Windows XP: 5.1 (build 2600) Service Pack 2; http://weitz.de/drakma/)
Accept: */*
Connection: close
HTTP/1.1 200 OK
Date: Sat, 29 Sep 2007 14:00:47 GMT
Server: Apache
Connection: close
Transfer-Encoding: chunked
Content-Type: text/xml; charset=utf-8
"<html>
<body>
äöü.
</body>
</html>
"
200
((:DATE . "Sat, 29 Sep 2007 14:00:47 GMT") (:SERVER . "Apache") (:CONNECTION . "close") (:TRANSFER-ENCODING . "chunked") (:CONTENT-TYPE . "text/xml; charset=utf-8"))
#<URI http://zappa.agharta.de/test.xml>
#<FLEXI-STREAMS::FLEXI-BINARY-UTF-8-IO-STREAM 200B901F>
T
"OK"
Do you get the same result with the URL above? (I'll leave it online
for testing purposes.) And can you send the headers sent back and
forth between Drakma and the server to the mailing list? How does
your HTTP-REQUEST call look like?
Edi.
More information about the Drakma-devel
mailing list