× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Apache DOES require the explicit "Content-Type: text/html;" in the
header...If not then the browser "assumes" that it is a downloadable file
(some graphics file type I forget which...)

Thanks,
Tommy Holden


-----Original Message-----
From: Joe Lee [mailto:LeeJD@xxxxxx]
Sent: Thursday, October 21, 2004 7:30 PM
To: web400@xxxxxxxxxxxx
Subject: RE: [WEB400] Browser tries to download program


HTML pages are sent to the browser from the web server as a HTTP
response message. A HTTP response message includes 2 sections. The first
section is the message header and consists on zero or more headers,
probably the most commonly used of which is the "Content-type" header.
The header section is followed by 2 CRLFs, which are followed by the
message body. In your case the message body is an HTML document. However
if there is no "Content-type" header the browser doesn't know that the
message body is a HTML document, and since the extension is not .htm,
.html, or something else that indicates that the message body is a HTML
document, the browser doesn't know how to handle the message body and
asks you where to save it. 

Strictly speaking the "Content-type" section isn't part of the HTML,
though it is sent to the browser. It probably worked before because the
IBM HTTP server (not based on APACHE) checked for a "Content-type"
header and added one if it didn't exist. On the browser side you still
won't see the "Content-type" section, however you should see the
document as an HTML page in the browser, instead of a download.

Joe Lee

p.s. If you want to find out more about the HTTP messages take a look
at RFC 2616.

>>> mskvarenina@xxxxxxx 10/21/2004 19:32:50 >>>
Finally, any additional thoughts on my problem?  My previous HTML
didn't
have a content type section.  I don't know how that would effect the
web
server itself as opposed to the browser.  For example does the web
server itself read the HTML then do something different/special when
it
sees a content type directive?




_______________________________________________
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.