Stephan_Manthe1
Jun 07, 2006Nimbostratus
inserting multiple variables into a single http header
hi,
we needed to add a single http-header including multiple variables (and some blanks!) like this:
SSLClientCipher: RC4-MD5, version=TLSv1/SSLv3, bits=128
it can be done in multiple ways:
when HTTP_REQUEST {
set sslinfo [SSL::cipher name]
set sslvers [SSL::cipher version]
set sslbits [SSL::cipher bits]
append sslinfo ", version=" $sslvers
append sslinfo ", bits=" $sslbits
HTTP::header insert SSLClientCipher $sslinfo
}
the following alternative might save some cpu-cycles:
when HTTP_REQUEST {
HTTP::header insert SSLClientCipher [SSL::cipher name],\x20version=[SSL::cipher version],\x20bits=[SSL::cipher bits]
}
the \x20 is used to create the required blanks between the different values.
ciao
stephan