in reply to [SOLVED]:CGI.pm header

Does this work?

print $query->header( '-Cache-Control' => $cache_val, '-Access-Control-Allow-Origin' => $origin_val, ..., );

Replies are listed 'Best First'.
Re^2: CGI.pm header
by $h4X4_|=73}{ (Monk) on May 24, 2016 at 16:24 UTC

    Yes it works. But there could be a new problem. Some for the names print out lower case in my tests.

    Expires: Tue, 24 May 2016 16:19:07 GMT Date: Tue, 24 May 2016 16:19:07 GMT Access-control-allow-origin: 2 Cache-control: 1 Cache: 1 Content-Type: text/html; charset=ISO-8859-1

    Do you think that will cause a problem?

      I honestly have no idea. Does it work when you test it?

        I just looked it up.

        Each header field consists of a name followed by a colon (":") and the field value. Field names are case-insensitive.

        Thanks for helping.++