How do I access the HTTP Header of request in a CGI script?

前端 未结 3 482
粉色の甜心
粉色の甜心 2020-12-16 11:29

I\'ve used Perl a bit for small applications and test code, but I\'m new to networking and CGI.

I get how to make the header of a request (using CGI.pm and printing

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-16 12:06

    They're supplied as environment variables, such as

    HTTP_HEADERATTRIBUTE=value
    

    You may have to do something to configure your web server to supply such a variable, though.

提交回复
热议问题