[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
read-response-body of (web response) depends on Content-Length but ...
From: |
Sunjoong Lee |
Subject: |
read-response-body of (web response) depends on Content-Length but ... |
Date: |
Fri, 27 Apr 2012 17:04:16 +0900 |
Hello,
(use-modules ((srfi srfi-11) #:select (let-values))
((web uri) #:select (string->uri))
((web client) #:select (http-get)))
(let-values (((res-headers res-body)
(display res-body)
(newline))
Above code display only false value, #f. After changing res-body to res-headers, it display;
#<<response> version: (1 . 1) code: 200 reason-phrase: "OK" headers: ((date . #<date nanosecond: 0 second: 42 minute: 50 hour: 7 day: 27 month: 4 year: 2012 zone-offset: 0>) (server . "Apache/2.2.14") (accept-ranges bytes) (cache-control (max-age . 0)) (expires . #<date nanosecond: 0 second: 42 minute: 50 hour: 7 day: 27 month: 4 year: 2012 zone-offset: 0>) (vary accept-encoding) (connection close) (transfer-encoding (chunked)) (content-type text/html) (content-language "en")) port: #<closed: file 0>>
Oh, Content-Length missing!! Apache server of
www.gnu.org replied response without Content-Length via home.en.html request. Is Content-Length mandatory of response? If so, it would be Apache's fault. But if not so, I think it's better modify read-response-body of (web response) in Guile.
Thanks.
- read-response-body of (web response) depends on Content-Length but ...,
Sunjoong Lee <=