# HTTP::header insert and header names

**URL:** <https://community.f5.com/t/http-header-insert-and-header-names/58525>\
**Category:** Technical Forums\
**Tags:** dev, irules, devops, application-delivery\
**Created:** [June 1, 2009, 11:33am UTC](https://community.f5.com/t/http-header-insert-and-header-names/58525 "2009-06-01T11:33:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tarmo\_Mamers](https://avatars.discourse-cdn.com/v4/letter/t/85e7bf/32.png) [@Tarmo\_Mamers](https://community.f5.com/u/Tarmo_Mamers)\
**Post date:** [June 1, 2009, 11:33am UTC](https://community.f5.com/t/http-header-insert-and-header-names/58525/1 "2009-06-01T11:33:02Z")

</div>

```tcl
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”?

---

<div class="post-metadata">

**Author:** ![spark\_86682](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@spark\_86682](https://community.f5.com/u/spark_86682)\
**Post date:** [June 2, 2009, 11:48pm UTC](https://community.f5.com/t/http-header-insert-and-header-names/58525/2 "2009-06-02T23:48:47Z")

</div>

HTTP::header should insert it exactly as given. It does not prepend “HTTP\_” on my system:

```tcl
when HTTP_RESPONSE { 
   HTTP::header insert headername headervalue 
 }

```

gives

```tcl
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.

---

<div class="post-metadata">

**Author:** ![hoolio](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@hoolio](https://community.f5.com/u/hoolio)\
**Post date:** [June 15, 2009, 11:47am UTC](https://community.f5.com/t/http-header-insert-and-header-names/58525/3 "2009-06-15T11:47:06Z")

</div>

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](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
