Calling clojure.xml/parse with a String parameter (URI) is similar to this java code:
SAXParserFactory.newInstance().newSAXParser().parse("<your_uri>", <instance of XMLHandler provided by Clojure>);
Clojure does not execute an HTTP GET request. It just uses the SAX parser as the default parser. The Sax parser internally creates an instance of XMLInputSource and passes it up to the XMLEntityManager . The XMLEntityManager class does all the work involved in opening a connection and retrieving your XML document (or more similar html):
URL location = new URL(expandedSystemId); URLConnection connect = location.openConnection(); ... skip ... stream = connect.getInputStream();
If XMLInputSource is an instance of HTTPInputSource , then XMLEntityManager sets the properties of the HTTP request. However, there is no similar functionality for XMLInputSource (this is what we have in the case of SAXParser).
I suppose it might help you change your SAX parser to a different implementation.
source share