newLISP v.10.2.4 on Linux IPv4 UTF-8, execute 'newlisp -h' for more info.
> ; "list" option works well.
> (read-file "[url]http://www.newlisp.org/example.lsp[/url]" "list")
("Last-Modified: Tue, 01 Jul 2008 13:54:24 GMTrnAccept-Ranges: bytesrnContent-Length: 58rnContent-Type: text/plainrnDate: Fri, 30 Apr 2010 13:06:12 GMTrnServer: ApachernETag: "c018d4-3a-486a3710"rnVia: 1.1 vhost.phx3.nearlyfreespeech.net:3128 (squid/2.7.STABLE7)rnConnection: closernrn"
"; example programnn(println "Welcome to newLISP")n(exit)nn")
> ; "list debug" option returns string (not a list)
> (read-file "http://www.newlisp.org/example.lsp" "list debug")
"; example programnn(println "Welcome to newLISP")n(exit)nn"
Here is patch:
--- nl-web.c 2010-04-30 21:46:04.000000000 +0900
+++ nl-web.c~ 2010-04-19 07:29:17.000000000 +0900
@@ -349,15 +349,15 @@
option = (char *)result->contents;
if(my_strnicmp(option, "header", 6) == 0)
headRequest = TRUE;
- if(my_strnicmp(option, "list", 4) == 0)
+ if(my_strnicmp(option, "list", 5) == 0)
listFlag = TRUE;
/* "debug" or "header debug" or "list-debug" options
print all outgoing informatiopn on the console */
if(my_strnicmp(option, "debug", 5) == 0)
debugFlag = TRUE;
- if(my_strnicmp(option + 7, "debug", 5) == 0) /* "header debug" */
+ if(my_strnicmp(option + 7, "debug", 5) == 0)
debugFlag = TRUE;
- if(my_strnicmp(option + 5, "debug", 5) == 0) /* "list debug" */
+ if(my_strnicmp(option + 6, "debug", 5) == 0)
debugFlag = TRUE;
if(params != nilCell)
params = getInteger(params, (UINT*)&socketTimeout);
Thanks Kosh.