Forum Discussion
emilio_104458
Nov 30, 2011Nimbostratus
issue with newline
hi all,
i've a strange issue with an irule:
i can't add new line in a variable.
i try with:
set allHeaders [concat $allHeadersTemp '\n']
set allHeaders [concat $allHeadersTemp "\n"]
set allHeaders [concat $allHeadersTemp \n]
set allHeaders [concat $allHeadersTemp '\r\n\r\n']
set allHeaders [concat $allHeadersTemp '\r\n']
set allHeaders [concat $allHeadersTemp "\r\n"]
set allHeaders [concat $allHeadersTemp "\r\n\r\n"]
set allHeaders [append allHeadersTemp "\r\n\r\n"]
and so on....
but when i log the variable with
log local0.debug " $allHeader"
the results is alway a single line with blank space instead new line.
can u help me?
thanks in advice :)
2 Replies
Sort By
- Newlines won't print in the log messages and the function you're looking for is called "join." I think the combination is what may be causing your issue here. Try printing them in an HTTP response like this and see how it works:
ltm rule concat_http_headers {when HTTP_REQUEST { set header_names [HTTP::header names] foreach header $header_names { lappend headers "$header: [HTTP::header value $header]" } HTTP::respond 200 content [join $headers "\n"]}}
- hi,
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects