Forum Discussion
Roman_80473
Nimbostratus
Jul 01, 2011How to find HOST protocol inside iRule?
Hi folks,
Is there a way to find host protocol inside HTTP_REQUEST event in iRule? I can get host ([HTTP::host] ) and uri ([HTTP::uri]), but not sure about protocol.
Any help is appreciated,
Thanks, Roman
4 Replies
- hoolio
Cirrostratus
Hi Roman,
You can't tell from just the HTTP headers or payload whether the request was sent via SSL. You can either assume SSL based on the virtual server port [TCP::local_port] or use an iRule to test whether a cipher was used:
http://devcentral.f5.com/Default.aspx?tabid=53&view=topic&postid=1170929&ptarget=1170978
Aaron - Roman_80473
Nimbostratus
Aaron,
Thank you for your reply. Should I use both approaches to determine for sure whether SSL is used?
if TCP::local_port value is 443 AND if {not ([catch {SSL::cipher version} result]) && $result ne "none"}
protocol = "https"
Thanks, Roman - hoolio
Cirrostratus
Hi Roman,
You don't need to check the port if you use this:
if {not ([catch {SSL::cipher version} result]) && $result ne "none"}
Aaron - Roman_80473
Nimbostratus
Got it, thank you
Roman
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
