Ask HN: Unknown. Not Unknown or expired link, just Unknown.
(= unknown-msg* "Unknown." max-age* (table) static-max-age* nil)
(def respond (str op args cooks ip) (w/stdout str (iflet f (srvops* op) (let req (inst 'request 'args args 'cooks cooks 'ip ip) (if (redirector* op) (do (prn rdheader) (prn "Location: " (f str req)) (prn)) (do (prn header) (awhen (max-age* op) (prn "Cache-Control: max-age=" it)) (f str req)))) (let filetype (static-filetype op) (aif (and filetype (file-exists (string staticdir* op))) (do (prn (type-header* filetype)) (awhen static-max-age* (prn "Cache-Control: max-age=" it)) (prn) (w/infile i it (whilet b (readb i) (writeb b str)))) (respond-err str unknown-msg*))))))
I don't read Lisp, let alone Arc but it seems like this code is parsing the http response headers and outputting the error message based on the Cache-Control header value.
Am I warm?
Edit: The URI causing this is news.ycombinator.com
9 comments
[ 3.9 ms ] story [ 31.2 ms ] threadin any case: what are your request headers?
When you change your internet settings on Windows to use a proxy, this is the format to which browsers generate requests.
From RFC 2616 5.1.2 Request-URI http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html :
'To allow for transition to absoluteURIs in all requests in future versions of HTTP, all HTTP/1.1 servers MUST accept the absoluteURI form in requests, even though HTTP/1.1 clients will only generate them in requests to proxies.'
My proxy shouldn't have to alter the request, according to the standard.