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)

x86
Linux
defect
Not set
minor

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
This is the unknown content decoder.
Target Milestone: --- → Future
I think this should be marked WONTFIX thoughts? or Invalid?
Whiteboard: Possible WONTFIX?
*** Bug 73999 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of 57717 ***
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
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 → ---
Keywords: qawanted
*shrug* the other bug is in parser land, which is not really view source.
Makring NEW.
Status: UNCONFIRMED → NEW
Ever confirmed: true
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
Target Milestone: mozilla0.9.4 → mozilla0.9.5
*** Bug 96963 has been marked as a duplicate of this bug. ***
*** Bug 102737 has been marked as a duplicate of this bug. ***
Blocks: 102737
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Summary is wrong. about:blank has a different content than the one that's displayed here.
0.9.6 is out the door already.
0.9.6 is long gone. -> 0.9.7
Target Milestone: mozilla0.9.6 → mozilla0.9.7
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 ago23 years ago
Resolution: --- → DUPLICATE
No longer blocks: 102737
You need to log in before you can comment on or make changes to this bug.