mirror of https://github.com/apache/archiva.git
return schema .xsd as it no jsoup parsing
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1395628 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cd6239cef0
commit
76fd653c09
|
@ -18,6 +18,7 @@ package org.apache.archiva.web.docs;
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.jsoup.Jsoup;
|
import org.jsoup.Jsoup;
|
||||||
import org.jsoup.nodes.Document;
|
import org.jsoup.nodes.Document;
|
||||||
|
@ -53,6 +54,12 @@ public class RestDocsServlet
|
||||||
String path = StringUtils.removeStart( req.getPathInfo(), "/" );
|
String path = StringUtils.removeStart( req.getPathInfo(), "/" );
|
||||||
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream( path );
|
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream( path );
|
||||||
|
|
||||||
|
if ( StringUtils.endsWith( path, ".xsd" ) )
|
||||||
|
{
|
||||||
|
IOUtils.copy( is, resp.getOutputStream() );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String startPath = StringUtils.substringBefore( path, "/" );
|
String startPath = StringUtils.substringBefore( path, "/" );
|
||||||
|
|
||||||
// replace all links !!
|
// replace all links !!
|
||||||
|
|
Loading…
Reference in New Issue