Forum Discussion

Greg_Burch's avatar
Greg_Burch
Icon for Nimbostratus rankNimbostratus
Mar 22, 2007

Adding Multiple Headers

Has anyone had any experience with adding multiple HTTP headers within an HTTP profile (in the Header Insert field)? I would like to know what the delimiter would be between the headers. Or is this not even possible...do I have to create an IRule in order to add the second header?

3 Replies

  • Any idea how to log all of these custom header using log local0. statement? Would it be like

    log local0. "Custom HTTP headers are [HTTP::header]"
    ?

    Thanks, Darshan

  • kunjan's avatar
    kunjan
    Icon for Nimbostratus rankNimbostratus

    Both request and response logging hdrs

    when HTTP_REQUEST {
        log local0. "Request URI = [HTTP::uri]"
        foreach x [HTTP::header names] {
            log local0. "Request header($x) = [HTTP::header $x]"
        }
    }
    when HTTP_RESPONSE {
        log local0. "Response status = [HTTP::status]"
        foreach x [HTTP::header names] {
            log local0. "Response header($x) = [HTTP::header $x]"
        }
    }
    
  • Hi Kunjan,

     

    Thanks a million! It works by printing all the HTTP headers to LTM logs.

     

    It was really helpful. Cheers! Darshan