Closed
Bug 71635
Opened 24 years ago
Closed 23 years ago
zero length file is treated as about:blank
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 102737
mozilla0.9.7
People
(Reporter: cesarb, Assigned: c)
References
Details
(Keywords: qawanted, Whiteboard: Possible WONTFIX?)
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.4.2 i686; en-US; 0.8.1) Gecko/20010309
BuildID: 2001030913
Reading a zero-sized file gets some random HTML source in the screen instead of
the expected empty page
Reproducible: Always
Steps to Reproduce:
1. Make sure there's no /tmp/empty.txt
2. touch /tmp/empty.txt
3. Open file:///tmp/empty.txt
Actual Results: Got "<html><body></body></html>"
Expected Results: The page should be completely blank
either networking or xpapps
Assignee: asa → dougt
Component: Browser-General → Networking: File
QA Contact: doronr → tever
Summary: funny result reading empty file from local disk → zero length file is treated as about:blank
Comment 3•24 years ago
|
||
I think this should be marked WONTFIX thoughts? or Invalid?
Whiteboard: Possible WONTFIX?
*** This bug has been marked as a duplicate of 57717 ***
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 6•24 years ago
|
||
Nope, not a dupe. bug 57717 is about view source. This one happens without you
even needing to open view source.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
*shrug* the other bug is in parser land, which is not really view source.
Assignee | ||
Comment 9•23 years ago
|
||
This is parser too.
At http://lxr.mozilla.org/seamonkey/source/htmlparser/src/nsParser.cpp#2708 ,
replacing
if(eOnStart==mParserContext->mStreamListenerState) {
//If you're here, then OnDataAvailable() never got called.
//Prior to necko, we never dealt with this case, but the problem may have
existed.
//What we'll do (for now at least) is construct a blank HTML document.
nsAutoString temp; temp.AssignWithConversion("<html><body></body></html>");
mParserContext->mScanner->Append(temp);
result=ResumeParse(PR_TRUE,PR_TRUE);
}
with
if(eOnStart==mParserContext->mStreamListenerState) {
mParserContext->mScanner->Append(NS_LITERAL_STRING(""));
}
fixes both this bug and bug 57717.
Appending an empty string seems to be neccessary. Without it I crash sometimes.
This will be fixed together with bug 57724, but isn't actually a dupe.
Assignee: dougt → clarence
Component: Networking: File → Parser
Target Milestone: Future → mozilla0.9.4
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla0.9.4 → mozilla0.9.5
Comment 10•23 years ago
|
||
*** Bug 96963 has been marked as a duplicate of this bug. ***
Comment 11•23 years ago
|
||
*** Bug 102737 has been marked as a duplicate of this bug. ***
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Comment 12•23 years ago
|
||
Summary is wrong.
about:blank has a different content than the one that's displayed here.
Comment 13•23 years ago
|
||
0.9.6 is out the door already.
Reporter | ||
Comment 15•23 years ago
|
||
Using dependencies instead of duping this to bug 102737 was a dumb idea.
WFM now. Probably fixed by bug 102737.
*** This bug has been marked as a duplicate of 102737 ***
Status: NEW → RESOLVED
Closed: 24 years ago → 23 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•