SAX parser exception for dtd hosted by InfinityFree but not other providers

My website URL is: http://barrybecker4.com

I am trying to parse XML documents that refer to a dtd in my website at
http://www.barrybecker4.com/bb4-projects/schema/plugins2012.dtd

Unfortunately, this stopped ever since I moved my website from yahoo hosting to InfinityFree.
I know that there is nothing wrong with the contents of the dtd file because, I can substitute

<!DOCTYPE plugins SYSTEM “https://raw.githubusercontent.com/bb4/bb4-games/master/source/com/barrybecker4/game/plugins2012.dtd”>
for
<!DOCTYPE plugins SYSTEM “http://www.barrybecker4.com/bb4-projects/schema/plugins2012.dtd”>

and it will work fine. The first url is just the location of the source dtd in my github repo. The contents of the second url should be identical, and appears to be when I compare them visually.

The error that I get when parsing the XML in java is

org.xml.sax.SAXParseException; systemId: http://www.barrybecker4.com/bb4-projects/schema/plugins2012.dtd; lineNumber: 1; columnNumber: 2;
The markup declarations contained or pointed to by the document type declaration must be well-formed.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)

but I only get this error if the dtd url points to the dtd on the InfinityFree site. I do not understand why. Does anyone have any theories as to why it might not be working?

Here is the full xml file if that helps:

<?xml version=“1.0” encoding=“UTF-8” standalone=“no”?>
<!DOCTYPE plugins SYSTEM “http://www.barrybecker4.com/bb4-projects/schema/plugins2012.dtd”>
<plugins date=“10/19/2004” author=“Barry Becker”>
<game name=“chess”
msgKey=“CHESS”
type=“TWO_PLAYER_GAME”
msgBundleBase=“com.barrybecker4.game.twoplayer.chess.resources.chessMessages”
panelClass=“com.barrybecker4.game.twoplayer.chess.ui.ChessPanel”
controllerClass=“com.barrybecker4.game.twoplayer.chess.ChessController” />
</plugins>

I think the issue you’re running into is caused by this security system: https://infinityfree.net/support/javascript-error-using-api-or-mobile-android-app/

In short, we provide hosting for websites, and websites are a collection of pages which are intended to be viewed in a web browser. File storage, database hosting and media distribution are not the purpose of our hosting, there are other services which are much more suitable for that.

To enforce this, every client first gets a Javascript challenge which must be completed before they can access any URL on your website. This breaks hotlinking and most automated tools/scrapers/API clients/etc. which fetch content from your website.

That is probably the reason. I cannot think of any other explanation.
I will try to find a workaround.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.