[armedbear-devel] EXT:URL-PATHNAME vs http: as a logical pathname
Karsten Poeck
karsten.poeck at gmail.com
Mon Aug 12 19:55:09 UTC 2013
Hello all,
I am trying to compile cl-http on abcl. Mostly got it loading, but have
some problems with abcls url-pathnames.
Example:
CL-USER> (lisp-implementation-version)
"1.2.1"
"Java_HotSpot(TM)_64-Bit_Server_VM-Apple_Inc.-1.6.0_51-b11-456-11M4508"
"x86_64-Mac_OS_X-10.8.4"
CL-USER> (lisp-implementation-type)
"Armed Bear Common Lisp"
CL-USER> (setf (logical-pathname-translations "http")
'(
("port;**;*.*"
"/Users/karstenpoeck/Documents/workspace/trunk/contrib/kpoeck/port-templa
te/**/*.*")
("**;*.*"
"/Users/karstenpoeck/Documents/workspace/trunk/**/*.*")
)
)
((#P"HTTP:PORT;**;*.*"
#P"/Users/karstenpoeck/Documents/workspace/trunk/contrib/kpoeck/port-temp
late/**/*.*") (#P"HTTP:**;*.*"
#P"/Users/karstenpoeck/Documents/workspace/trunk/**/*.*"))
;;;; the problem is here
CL-USER> (translate-logical-pathname "http:declaration.lisp")
#P"http:"
If I do the same with httpx: instead of http:, the code loads fine. The
reason is probably the following.
CL-USER> (type-of (pathname "http:declaration.lisp"))
URL-PATHNAME
Later starting up cl-hhtp i get:
http:www;foo.html has a null authority.
http:www;foo.html has a null authority.
http:proxy-cache; has a null authority.
http:pw;random-seed.lisp has a null authority.
java.lang.NullPointerException
at sun.net.www.ParseUtil.toURI(ParseUtil.java:261)
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnectio
n.java:905)
at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.jav
a:836)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnect
ion.java:1172)
at java.net.URL.openStream(URL.java:1010)
at org.armedbear.lisp.Pathname.getInputStream(Pathname.java:2369)
....
I completely understand that it is desirable to have
(load "http://beta.quicklisp.org/quicklisp.lisp") working, but can't you
check for "http://" or "https://" before converting a pathname to an
url-pathname?
Karsten
More information about the armedbear-devel
mailing list