Project

Profile

Help

Using http basic auth inside of document()

Added by Anonymous about 13 years ago

Legacy ID: #10832285 Legacy Poster: James Sulak ()

Hi, I'm attempting to do an HTTP GET with document(), for simple cases, this works great. However, this does not work when I need to use basic authentication: document('http://user:password@host.com/') Is this supported in any way in Saxon, or will I have to use a custom URI resolver? Thanks, James


Replies (1)

RE: Using http basic auth inside of document() - Added by Anonymous about 13 years ago

Legacy ID: #10832323 Legacy Poster: Michael Kay (mhkay)

Saxon's standard URI resolver will pass the URI unchanged to the chosen SAX parser (as an InputSource), so it's possible that what gets accepted may depend on which XML parser you are using. If you can find accurate documentation on what each XML parser accepts then you're smarter than me; but it's fair guess that at some stage someone is going to call a Java library routine like URL.getConnection(). If you want to do something that this can't handle directly, you're going to have to code it yourself in your own URIResolver.

    (1-1/1)

    Please register to reply