Merge pull request #330 from linkchecker/fix-sitemap

Fix sitemap parser
This commit is contained in:
Marius Gedminas 2019-10-25 16:15:55 +03:00 committed by GitHub
commit 5b2b3613ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View file

@ -39,7 +39,7 @@ class XmlTagUrlParser(object):
self.url_data = url_data
self.loc = False
self.url = u""
data = url_data.get_content()
data = url_data.get_raw_content()
isfinal = True
try:
self.parser.Parse(data, isfinal)

View file

@ -0,0 +1,4 @@
url http://localhost:%(port)d/%(datadir)s/sitemap.xml
cache key http://localhost:%(port)d/%(datadir)s/sitemap.xml
real url http://localhost:%(port)d/%(datadir)s/sitemap.xml
valid

View file

@ -26,6 +26,7 @@ class TestHttpMisc (HttpServerTest):
@need_network
def test_html (self):
self.swf_test()
self.file_test("sitemap.xml")
def swf_test (self):
url = self.get_url(u"test.swf")