mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-20 17:29:51 +00:00
try to handle doctype declarations
This commit is contained in:
parent
b07758de29
commit
d61a230861
1 changed files with 4 additions and 0 deletions
|
@ -534,6 +534,7 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
|
|||
|
||||
final XmlPullParser pp = parserFactory.newPullParser();
|
||||
pp.setInput(is, null);
|
||||
pp.setFeature(XmlPullParser.FEATURE_PROCESS_DOCDECL, false);
|
||||
final ResultHeader header = enterItdRequest(pp);
|
||||
|
||||
if (!XmlPullUtil.jumpToStartTag(pp, null, "itdOdv") || !"dm".equals(pp.getAttributeValue(null, "usage")))
|
||||
|
@ -2315,6 +2316,9 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
|
|||
if (pp.getEventType() == XmlPullParser.START_DOCUMENT)
|
||||
pp.next();
|
||||
|
||||
if (pp.getEventType() == XmlPullParser.DOCDECL)
|
||||
pp.next();
|
||||
|
||||
if (XmlPullUtil.test(pp, "html"))
|
||||
throw new ProtocolException("html");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue