maven-doxia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bentmann <benjamin.bentm...@udo.edu>
Subject Re: svn commit: r1035472 - /maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
Date Mon, 15 Nov 2010 22:19:01 GMT
Hi Dennis,

> Author: dennisl
> Date: Mon Nov 15 22:09:05 2010
> New Revision: 1035472
>
> URL: http://svn.apache.org/viewvc?rev=1035472&view=rev
> Log:
> [DOXIA-417] The XmlParser is blocked from W3C URLs
>
> Modified:
>      maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
>
> Modified: maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
> URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java?rev=1035472&r1=1035471&r2=1035472&view=diff
> ==============================================================================
> --- maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
(original)
> +++ maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
Mon Nov 15 22:09:05 2010
> @@ -798,6 +798,9 @@ public abstract class AbstractXmlParser
>               // it is an HTTP url, using HttpClient...
>               DefaultHttpClient client = new DefaultHttpClient();
>               HttpGet method = new HttpGet( url.toString() );
> +            // Set a user-agent that doesn't contain the word "java", otherwise it will
be blocked by the W3C
> +            // The default user-agent is "Apache-HttpClient/4.0.2 (java 1.5)"
> +            method.setHeader( "user-agent", "Apache-HttpClient/4.0.2" );

Wouldn't it be more appropriate to use "Apache-Doxia" as user agent or 
otherwise indicate Doxia as the higher level app that issues the request?


Benjamin

Mime
View raw message