Calling css-validator.jar and specifying http auth credentials

Hi,

I'd like to know if I can call css-validator.jar from the command line 
and specify the credentials to be used when encountering a HTTP 401 
response.

For example, let's say that http://example.com/protected/ is secured 
with http basic authentication. Without being able to specify the 
credentials to use, we get this:

java -jar css-validator.jar http://example.com/protected/
{vextwarning=false, output=text, lang=en, warning=2, medium=all, 
profile=css3}
java.net.ProtocolException: Basic realm="Restricted"
     at org.w3c.css.util.HTTPURL.getConnection(HTTPURL.java:284)
     at org.w3c.css.util.HTTPURL.getConnection(HTTPURL.java:312)
     at org.w3c.css.css.DocumentParser.<init>(DocumentParser.java:124)
     at org.w3c.css.css.CssValidator.main(CssValidator.java:154)

I have tried adding the credentials to the URL in the form 
http://username:password@example.com/protected/ and this appears to have 
no effect.

What changes, if any, can I make to the above command such that the 
required credentials are supplied to the css validator?

Thanks in advance for any suggestions.

Cheers,
Jon Cram

Received on Wednesday, 9 October 2013 09:15:12 UTC