#new response object with default error values my $response = new HTTP::Response( 404,undef,undef,"404 - Not found." ); #assign values using obvious methods $response->header(Content_Length => $len); $response->header(Content_Type => "image/svg+xml"); $response->content($out); $response->code(200); $c->send_response($response);