I'm having a strange problem here. Here's the code, I'm using to fetch a url content:

URL u = new URL(url);
InputStream is = new BufferedInputStream(u.openStream());

I've got two urls, I want to fetch with this code. Both contain xml data. To be specific, the first one is http://www.berlingske.dk/unwire/latest/news_article/2/10, the second one is http://www.bt.dk/mecommobile/latest/news_article/1368/10?output_type=xml. The first one gets fetched correctly, the second one does not. I added some logging, and found out, that for the second url some weird html page gets fetched, instead of the expected xml. How can that be even possible?

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top