summaryrefslogtreecommitdiff
path: root/suds/reader.py
diff options
context:
space:
mode:
Diffstat (limited to 'suds/reader.py')
-rw-r--r--suds/reader.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/suds/reader.py b/suds/reader.py
index fbd8760..1184f12 100644
--- a/suds/reader.py
+++ b/suds/reader.py
@@ -78,7 +78,7 @@ class DocumentReader(Reader):
if d is None:
d = self.download(url)
cache.put(id, d)
- self.plugins.document.parsed(root=d.root())
+ self.plugins.document.parsed(url=url, document=d.root())
return d
def download(self, url):
@@ -93,8 +93,12 @@ class DocumentReader(Reader):
fp = store.open(url)
if fp is None:
fp = self.options.transport.open(Request(url))
+ content = fp.read()
+ fp.close()
+ ctx = self.plugins.document.loaded(url=url, document=content)
+ content = ctx.document
sax = Parser()
- return sax.parse(file=fp)
+ return sax.parse(string=content)
def cache(self):
"""