Closed
Bug 68824
Opened 24 years ago
Closed 19 years ago
XMLParser::getDocumentFromURI returns empty documents for missing pages
Categories
(Core :: XSLT, defect, P5)
Core
XSLT
Tracking
()
RESOLVED
FIXED
mozilla1.8beta5
People
(Reporter: sicking, Assigned: peterv)
References
Details
(Keywords: fixed1.8)
Attachments
(2 files, 5 obsolete files)
402 bytes,
text/xml
|
Details | |
1.21 KB,
patch
|
axel
:
review+
bzbarsky
:
superreview+
asa
:
approval1.8b5+
|
Details | Diff | Splinter Review |
The mozmodule implementation of XMLParser::getDocumentFromURI returns an empty
document when given an url to a missing page. It should return NULL.
This is needed for the document() xslt function which should return an empty
nodeset if the document is missing.
Reporter | ||
Comment 1•24 years ago
|
||
The following happens:
nsSyncLoader::LoadDocument creates an empty document and tries to load from the
given URL. However if the load fails nsSyncLoader is never notified.
Neither ::Error or ::Abort is called. Then once the load is finished (and
unsuccessful) the empty document is returned.
Assignee | ||
Updated•24 years ago
|
Target Milestone: --- → mozilla0.9.1
Assignee | ||
Updated•24 years ago
|
Target Milestone: mozilla0.9.1 → mozilla1.1
Reporter | ||
Comment 2•23 years ago
|
||
It should be fairly easy to workaround this by checking if doc.documentElement
returns NULL right before the doc is returned from the syncloader.
Assignee | ||
Comment 3•23 years ago
|
||
Sicking: I think my patch in 73936 fixes this, so no need for the workaround?
Updated•23 years ago
|
Priority: -- → P5
Assignee | ||
Comment 4•23 years ago
|
||
I think this is fixed now. Sicking, could you verify?
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 5•23 years ago
|
||
sorry, I seem to get empty documents for failed http loads... testcase coming up
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Reporter | ||
Comment 6•23 years ago
|
||
Reporter | ||
Comment 7•23 years ago
|
||
Reporter | ||
Comment 8•23 years ago
|
||
This is partly fixed with the output rewrite. It works fine for http-loaded
documents (except that moz locks up for a while), but file-loaded documents are
really doing some wierd things. Doing
document('file:///fud.xml')
returns a document which contains a <html><body></body></html> tree.
Reporter | ||
Comment 9•23 years ago
|
||
Attachment #44770 -
Attachment is obsolete: true
Attachment #44771 -
Attachment is obsolete: true
Reporter | ||
Comment 10•23 years ago
|
||
Reporter | ||
Comment 11•23 years ago
|
||
save the two attachments above to a local directory
Assignee | ||
Updated•23 years ago
|
Status: REOPENED → ASSIGNED
Target Milestone: mozilla1.1alpha → mozilla1.2alpha
Assignee | ||
Comment 12•22 years ago
|
||
This is still a problem?
Target Milestone: mozilla1.2alpha → mozilla1.4alpha
Reporter | ||
Comment 13•22 years ago
|
||
Attachment #66692 -
Attachment is obsolete: true
Attachment #66693 -
Attachment is obsolete: true
Reporter | ||
Comment 14•22 years ago
|
||
Attachment #114137 -
Attachment is obsolete: true
Reporter | ||
Comment 15•22 years ago
|
||
this works on windows both from file:// and from http://. It'd be great if we
could get tested on more platforms. Just download the testcase, save it as
anything, and open in browser.
Comment 16•22 years ago
|
||
I get a "not loaded" from http: and a "loaded" from file:
Peter, you have some experience now, any idea? Maybe we don't propagate the
Open rv good enough.
(couldn't triage 1.4, so unsetting milestone, this is neither 1.4a nor b)
Target Milestone: mozilla1.4alpha → ---
Assignee | ||
Comment 17•22 years ago
|
||
WFM for both file:// and http:// on OS X.
Comment 18•22 years ago
|
||
obviously this is either random or just the other way around as I reported it.
Note that neither
nsParser::OnStopRequest
nor
nsForceXMLListener::OnStopRequest
handle http status messages.
One of them probably should, maybe even both. As nsParser is prolly defined to
return its about:blank empty doc, should nsForceXMLListener be the one?
No idea how to pass this thru the woods, though.
Assignee | ||
Comment 19•19 years ago
|
||
Let's do this for now, might try to get this on the branch too. The real fix is
probably in the syncloader, but since that has more consumers it'll take more
time.
Attachment #194329 -
Flags: review?(axel)
Updated•19 years ago
|
Attachment #194329 -
Flags: review?(axel) → review+
Assignee | ||
Updated•19 years ago
|
Attachment #194329 -
Flags: superreview?(bzbarsky)
Updated•19 years ago
|
Attachment #194329 -
Flags: superreview?(bzbarsky) → superreview+
Assignee | ||
Updated•19 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 23 years ago → 19 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 20•19 years ago
|
||
Comment on attachment 194329 [details] [diff] [review]
v1
This makes us detect 404 pages etc and avoids treating them as XSLT
stylesheets, which could lead to hangs/crashes (as seen in bug 226425).
Attachment #194329 -
Flags: approval1.8b5?
Updated•19 years ago
|
Attachment #194329 -
Flags: approval1.8b5? → approval1.8b5+
You need to log in
before you can comment on or make changes to this bug.
Description
•