Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

apache configurations



>>>>> "HH" == Hatsuhiro, Inc <hatuhiro@example.com> writes:

    HH> Now to see an html sample "/home/tom/abc",

    HH> --- abc -----------------------------------------
    HH> Content-type: text/html

    HH> <html>
    HH>     <body>
    HH>         Hello, World!
    HH>     </body>
    HH> </html>
    HH> ================================================

    HH> The browser returns this.  How come Content-type
    HH> appears explicitly?

    HH> --- a result --------------------------------------
    HH> Content-type: text/html Hello, World!

    HH> ================================================

When the browser is reading a file, it doesn't expect any HTTP headers
since it's not using HTTP.  That's just text, and the browser displays
it literally.  (IMHO it should completely ignore it or maybe even
complain about it, but hey, this is HTML.  Get your tag soup[1] here!
Who knows what's in it, but it looks delicious!)

When the browser is talking via HTTP to a server, it takes the first
block of non-empty lines as the header (ie, the header stops the first
time it encounters the string "\r\n\r\n" in the stream).  Servers
operate in two modes.

In "yakizakana" mode, the server generates HTTP headers itself and
automatically inserts a blank line.  This means that the same result
will occur if your file is served by Apache.  (That's why we have the
HTTP-EQUIV attribute for the META tag.)

In "sashimi" mode, the server may transmit some headers (eg, to
identify itself), but there will not be a blank line.  Thus, all
following text will be interpreted as headers until "\r\n\r\n" is
output by the CGI program.  I think Apache calls this "send-asis", I
haven't had the need so I don't know the details.


Footnotes: 
[1]  [tm] Lynx, AFAIK.

-- 
University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences       Tel/fax: +81 (298) 53-5091
_________________  _________________  _________________  _________________
What are those straight lines for?  "XEmacs rules."


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links