Some feedback:
Using additional "debug" flag, "list debug" differs from "raw debug", which does not show sent headers:
Code Select
> (get-url "http://localhost/doesNotExist.txt" "list debug")
GET /doesNotExist.txt HTTP/1.1
Host: localhost
User-Agent: newLISP v10604
Connection: close
HTTP/1.1 404 Not Found
("Date: Fri, 17 Jul 2015 11:17:21 GMTrnServer: Apache/2.2.22 (Debian)rnVary: Accept-EncodingrnContent-Length: 289rnConnection: closernContent-Type: text/html; charset=iso-8859-1rnrn"
"ERR: server code 404: HTTP/1.1 404 Not Foundrn<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">n<html><head>n<title>404 Not Found</title>n</head><body>n<h1>Not Found</h1>n<p>The requested URL /doesNotExist.txt was not found on this server.</p>n<hr>n<address>Apache/2.2.22 (Debian) Server at localhost Port 80</address>n</body></html>n"
404)
> (get-url "http://localhost/doesNotExist.txt" "raw debug")
("Date: Fri, 17 Jul 2015 11:17:30 GMTrnServer: Apache/2.2.22 (Debian)rnVary: Accept-EncodingrnContent-Length: 289rnConnection: closernContent-Type: text/html; charset=iso-8859-1rnrn"
"ERR: server code 404: HTTP/1.1 404 Not Foundrn<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">n<html><head>n<title>404 Not Found</title>n</head><body>n<h1>Not Found</h1>n<p>The requested URL /doesNotExist.txt was not found on this server.</p>n<hr>n<address>Apache/2.2.22 (Debian) Server at localhost Port 80</address>n</body></html>n"
404)
I would expect to see sent headers for "raw debug", too.
Difference in semantics between "raw" and "list" seems to be, to avoid redirection in "raw" case (not tested); because
Code Select
> (get-url "http://localhost/doesNotExist.txt" "list")
("Date: Fri, 17 Jul 2015 11:18:07 GMTrnServer: Apache/2.2.22 (Debian)rnVary: Accept-EncodingrnContent-Length: 289rnConnection: closernContent-Type: text/html; charset=iso-8859-1rnrn"
"ERR: server code 404: HTTP/1.1 404 Not Foundrn<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">n<html><head>n<title>404 Not Found</title>n</head><body>n<h1>Not Found</h1>n<p>The requested URL /doesNotExist.txt was not found on this server.</p>n<hr>n<address>Apache/2.2.22 (Debian) Server at localhost Port 80</address>n</body></html>n"
404)
> (get-url "http://localhost/doesNotExist.txt" "raw")
("Date: Fri, 17 Jul 2015 11:18:11 GMTrnServer: Apache/2.2.22 (Debian)rnVary: Accept-EncodingrnContent-Length: 289rnConnection: closernContent-Type: text/html; charset=iso-8859-1rnrn"
"ERR: server code 404: HTTP/1.1 404 Not Foundrn<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">n<html><head>n<title>404 Not Found</title>n</head><body>n<h1>Not Found</h1>n<p>The requested URL /doesNotExist.txt was not found on this server.</p>n<hr>n<address>Apache/2.2.22 (Debian) Server at localhost Port 80</address>n</body></html>n"
404)