Sending correct header content-type depending on page type