Forum Discussion

Tarmo_Mamers's avatar
Tarmo_Mamers
Icon for Nimbostratus rankNimbostratus
Jun 01, 2009

HTTP::header insert and header names

HTTP::header insert somename somevalue
inserts "HTTP_" before the specified variable name of "somename". Is it possible to have it not inserted - to have the HTTP header with exactly the specified header name "somename"?

2 Replies

  • spark_86682's avatar
    spark_86682
    Historic F5 Account
    HTTP::header should insert it exactly as given. It does not prepend "HTTP_" on my system:

     
     when HTTP_RESPONSE { 
       HTTP::header insert headername headervalue 
     } 
     

    gives

     
     HTTP/1.1 200 OK 
     Date: Tue, 02 Jun 2009 22:26:02 GMT 
     Accept-Ranges: bytes 
     Content-Length: 45 
     Connection: close 
     Content-Type: text/html 
     headername: headervalue 
     

    and doing it for requests works similarly. Perhaps you should try logging the contents of the parameters you pass to HTTP::header.
  • The webserver may provide CGI variables with HTTP_ prepended to indicate the values were generated from HTTP headers in the client's request:

     

     

     

    http://hoohoo.ncsa.illinois.edu/cgi/env.html

     

     

    In addition to these, the header lines received from the client, if any, are placed into the environment with the prefix HTTP_ followed by the header name. Any - characters in the header name are changed to _ characters. The server may exclude any headers which it has already processed, such as Authorization, Content-type, and Content-length. If necessary, the server may choose to exclude any or all of these headers if including them would exceed any system environment limits.

     

     

     

     

    Aaron