Rebol - HTTP response headers

浪子不回头ぞ 提交于 2019-12-11 02:06:21

问题


Where does Rebol (R2) save the HTTP response headers after a call to the read function (which just seems to return the page content)?


回答1:


Not sure there is an easy way to get the headers after a straight read.

You can get them if you open a port:

hp: open http://www.rebol.com
probe hp/locals/headers
    make object! [
        Date: "Sat, 07 May 2011 07:08:35 GMT"
        Server: "Apache"
        Last-Modified: "Tue, 22/Feb/2011/06:52:26/+GMT"
        Accept-Ranges: "bytes"
        Content-Encoding: none
        Content-Type: "text/html"
        Content-Length: "9062"
        Location: none
        Expires: none
        Referer: none
        Connection: "close"
        Authorization: none
    ]


来源:https://stackoverflow.com/questions/5916164/rebol-http-response-headers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!