title: Why can't I just add Content-Type:text/html to a text file when Python can?
body: <p>This will seem like a stupid question to most of you but why can't I do this:</p>
  
  <pre><code>Content-Type:text/html
  
  &lt;html&gt;
  &lt;head&gt;&lt;title&gt;Hello&lt;/title&gt;&lt;/head&gt;
  &lt;body&gt;
  &lt;h1&gt;Hello, World!&lt;/h1&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>in a file called <code>test.txt</code> and open it in my browser as html when a Python script can do this:</p>
  
  <pre><code>#!/usr/bin/python
  
  print "Content-type:text/html\r\n\r\n"
  print '&lt;html&gt;'
  print '&lt;head&gt;'
  print '&lt;title&gt;Hello Word - First CGI Program&lt;/title&gt;'
  print '&lt;/head&gt;'
  print '&lt;body&gt;'
  print '&lt;h2&gt;Hello Word! This is my first CGI program&lt;/h2&gt;'
  print '&lt;/body&gt;'
  print '&lt;/html&gt;'
  </code></pre>
  
  <p>and everything works fine. I can't see any difference, they are both printing <code>Content-Type:text/html</code> at the top of the information the browser has requested.</p>