All pastes #458144 Raw Copy code Copy link Edit

Miscellany

public text v1 · immutable
#458144 ·published 2007-04-25 18:59 UTC
rendered paste body
    $http->setNoHeader(1);
    my $req = $session->request;
    #$req->content_type('application/octet-stream');
    #$req->headers_out->set('Content-Disposition' => 'attachment; filename="'.$filename.'"');
    $req->no_cache(0);
    $req->headers_out->set('HTTP_X_WebGUI_TEST' => "WTF");
    $req->headers_out->set('Cache-Control' => 'private');
    $req->headers_out->set('Pragma' => 'no-cache, blah');
    $req->headers_out->set('Last-Modified' => time);
    $req->content_type('text/plain');
    $req->status(200);

# I get the HTTP_X_WebGUI_TEST header, but Cache-control and pragma are invariably "no-cache"