Closed
Bug 44627
Opened 25 years ago
Closed 25 years ago
[mac]local files without .html extension are not loaded correctly
Categories
(Core :: Networking, defect, P4)
Core
Networking
Tracking
()
VERIFIED
FIXED
People
(Reporter: johng, Assigned: gordon)
References
()
Details
(Keywords: platform-parity, Whiteboard: [nsbeta3+])
Attachments
(3 files)
reproduce:
- go to www.quote.com
- click "log in"
- see the pop-up log-in window and compare these results to the results from a
4.x browser.
Although the text is the same, the appearance is very different. Furthermore,
if you do log in (you can get a free 30 day trial), you get a results page. In
4.x, you get a full page (I believe initiated by a javascript call), but with
this browser thepage is blank.
using nscp branded build 06/28/00
Just redid it - the log-in page and log-out page displays fine (just so slow
first time that I thought it was broken).
However, the follow-up page (what you get after you log-in) is still blank. The
page/command it is attemping to display is the following:
javascript:featureWin('http://www.quote.com/quotecom/auth/login.asp','login',450,350);
jg
Summary: Log in page lays out poorly, follow-up page blank → follow-up page to log-in or log out is blank
Comment 3•25 years ago
|
||
The problem is fairly serious: remote URLs without a ".html" extension are not
displayed at all. The HTTP query is sent to the server; the server sends back the
page with "Content-Type: text/html" but Mozilla doesn't display anything if the
URL doesn't have a ".html" extension. It means that all the CGI and ASP pages are
simply ignored.
There is similar problem with local files. Save the same html file on your local
machine and make 2 copies - 1 with a .html extension, 1 with a .asp extension -
then load them both in Mozilla. They are not displayed identically.
I'm going to attach 3 files:
- Session Transcript: a text file that shows the HTTP log between Mozilla and the
server. Nothing looks wrong there.
- Sample page: save 2 copies of this file on your local machine, one as
"login.html" and one as "login.asp".
- Testcase: save it on your local machine and open in Mozilla.
Changed summary line from "follow-up page to log-in or log out is blank" to "URLs
without .html extension are not displayed". Set P1/Blocker because we can't use
the Query page on Bugzilla. Reassigned to Parser/harishd because it doesn't seem
to be a NetLib problem.
Assignee: pierre → harishd
Severity: normal → blocker
Component: Layout → Parser
OS: Windows 95 → All
Priority: P3 → P1
Hardware: PC → All
Summary: follow-up page to log-in or log out is blank → URLs without .html extension are not displayed at all
Comment 4•25 years ago
|
||
Comment 5•25 years ago
|
||
Comment 6•25 years ago
|
||
Johng, the follow up page
(Javascript:featureWin('http://www.quote.com/quotecom/auth/login.asp','login',45
0,350); ) being blank page could be related to bug 36081.
Status: NEW → ASSIGNED
Pierre, your test case seems to work for me. Could you please update me on this?
Thanx.
Comment 10•25 years ago
|
||
With 07/12 builds, it works on Win98 but not on the Mac.
Harish, could you test on Unix? If the problem only happens on the Mac, I may be
able to help. As I said, it makes the app unusable because too many forms just
don't load.
Comment 11•25 years ago
|
||
I don't see the problem on Unix either. Pierre, I might need your help to see
this no MAC.
BTW, parser doesn't do any platform specific task. I think the problem could be
somewhere up in the webshell level. CC ing Jud.
Comment 12•25 years ago
|
||
definately not webshell related. this is most likely nsMIMEService related.
Note: my mac works fine w/ bugzilla query page, build from this morning.
Comment 13•25 years ago
|
||
the mime service is just a list of hard coded file extension to content type
mappings. Nothing non-XP here.
Oh wait, actually there is a small part that's mac specific. Davidm wrote a
snippet of code to interact with internet config to determine the content type
for file extensions. Maybe his code is getting in your way?
Even if that were the case, if the content type coming back from the server is
indeed "text/html" then the http channel should be telling the world that's the
content type and not even bothering to look at the file extension.
Comment 14•25 years ago
|
||
possibly related. 39797
Comment 15•25 years ago
|
||
Reducing priority because the different web pages work for me now.
We still have the problem with local files as shown in my testcase.
Reassigning to myself to investigate on the Mac or try to find a XP testcase.
Assignee: harishd → pierre
Severity: blocker → normal
Status: ASSIGNED → NEW
Priority: P1 → P3
Comment 16•25 years ago
|
||
Changed summary from "URLs without .html extension are not displayed at all" to
"[mac]local files without .html extension are not loaded correctly".
Reassigned to Networking. See my comments from [2000-07-10 02:38] about local
files: it's the only remaining problem.
Assignee: pierre → gagan
Component: Parser → Networking
Keywords: pp
QA Contact: petersen → tever
Summary: URLs without .html extension are not displayed at all → [mac]local files without .html extension are not loaded correctly
Comment 18•25 years ago
|
||
getting on the right radar.
| Assignee | ||
Comment 19•25 years ago
|
||
Looks like nsUnknownDecoder never gets a chance at files with a type of TEXT and
no extension. nsMIMEService::GetTypeFromFile sets the MIME type to text/plain
when the file is opened, so nsUnknownDecoder never gets a chance to parse the
data to determine if another type is more appropriate. Here's my proposed fix,
that I'll check in as soon as someone reviews it.
Index: mozilla/netwerk/mime/src/nsMIMEService.cpp
===================================================================
RCS file: /cvsroot/mozilla/netwerk/mime/src/nsMIMEService.cpp,v
retrieving revision 1.35
diff -r1.35 nsMIMEService.cpp
42a43
> #include "nsMimeTypes.h"
221c222,226
< return info->GetMIMEType(aContentType);
---
> rv = info->GetMIMEType(aContentType);
> if (NS_SUCCEEDED(rv)) {
> if (nsCRT::strcasecmp(*aContentType, TEXT_PLAIN)) // Let nsUnknownDecoder try to do better.
> return rv;
> }
Status: NEW → ASSIGNED
| Assignee | ||
Comment 20•25 years ago
|
||
Above change checked in.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 21•25 years ago
|
||
On my mac (os9) without this change, I'm able to open an html file lacking an
extension just fine (it's rendered as html).
Comment 22•25 years ago
|
||
Judson, that wasn't the problem. To reproduce:
- save locally the attached testcase
- save locally 2 copies of the attached sample page, one as "login.html", the
other as "login.asp"
- load the testcase
- click on the 2 links at the bottom
==> Bug: "login.asp" is displayed as a text file
I confirm that the patch from Gordon fixes the problem but I'm not marking
Verified to let QA run similar tests if they have some.
| Assignee | ||
Comment 23•25 years ago
|
||
Jud, in some cases, depending on the files type and creator codes, a file with no
extension that rendered in 4.x as html would render as text in mozilla. What
were the type and creator codes of your test files?
Also...what Pierre said.
You need to log in
before you can comment on or make changes to this bug.
Description
•