Practical mod_perl / HTML Book /



previous page: 16.2. Content Headers
  
page up: HTML Version of the book
  
next page: 16.2.2. Content-Length Header

16.2.1. Content-Type Header


Most CGI programmers are familiar with Content-Type. Sections 3.7, 7.2.1, and 14.17 of the HTTP specification cover the details. mod_perl has a content_type( ) method to deal with this header:

$r->content_type("image/png");

Content-Type should be included in every set of headers, according to the standard, and Apache will generate one if your code doesn't. It will be whatever is specified in the relevant DefaultType configuration directive, or text/plain if none is active.

 

Continue to:

  • prev: 16.2. Content Headers
  • Table of Contents
  • next: 16.2.2. Content-Length Header







TOP
previous page: 16.2. Content Headers
  
page up: HTML Version of the book
  
next page: 16.2.2. Content-Length Header


Menu

  • HTML Book
  • PDF Book
  • Download Code
  • Table of Contents
  • Errata
  • mod_perl2 User's Guide
  • Sitemap

Search


Add to Google




Creative Commons License


Written by
Eric Cholet (Logilune) and
Stas Bekman (StasoSphere & Free Books).


[ Privacy Policy | Terms of Use | About Us | Search ]

© 2007 StasoSphere.com