# add or replace the 'type' header $webapp->header_add( -type => 'image/jpeg', -attachment => 'foo.jpg' );