Forum Discussion
iRule STREAM
Hi all,
I'm testing the iRule below but it seems to be false, because i get an Error 411 :
when HTTP_REQUEST { if { [HTTP::host] eq "alfons-pp.domain.com" } { STREAM::disable HTTP::header remove "Accept-Encoding" } }
when HTTP_RESPONSE { if { ([HTTP::header value Content-Type] contains "text") and ([HTTP::header values Location] contains "alfons-pp.domain.com") } { STREAM::expression {@@} STREAM::enable } }
Could you please help me making this iRule works ?
2 Replies
Hi,
What happens if you change your stream expression for:
STREAM::expression {@@} to STREAM::expression "@
Cheers,
Kees
- Ajit
Altostratus
Hello Sinistrad,
Try the following iRule and let me know how it goes :
when HTTP_REQUEST { HTTP::header remove "Accept-Encoding" STREAM::disable set host [HTTP::host] } when HTTP_RESPONSE { STREAM::disable if { [HTTP::header exists Location] } { HTTP::header replace Location [string map {"http://" "https://"} [HTTP::header Location]] } if { [HTTP::header Content-Type] contains "text" } { set before "http://${host}:80/" set after "https://${host}/" STREAM::expression "@${before}@${after}@" STREAM::enable } }Regards,
AS
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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