Forum Discussion
Jamey_Price_105
Nimbostratus
Jan 25, 2005Problem rewriting header attribute on HTTP code 302
I'm new to TCL as of yesterday, so if I'm doing something monumentally dumb, please pardon me.
Our application runs on a server on port 9080, clients access it via port 80 or 443. When...
Jamey_Price_105
Nimbostratus
Jan 25, 2005Replying to my own post here...
I've modified the way it works, and like this, things are fine-ish. What I don't understand is if I try to use the commented line below to just fix the header instead of issuing my own redirect, I get the following in the logs.
TCL error: Rule redirectwrongport - Illegal argument. Illegal argument. Illegal argument. Illegal argument. Ille (line 1) invoked from within "HTTP::header Location $thingy"
when HTTP_RESPONSE {
if { [HTTP::header Location] starts_with "http://dev.oursite.com:9080" } {
regexp .+:9080/(.*) [HTTP::header Location] garbage whatiwant
variable thingy
set thingy "http://dev.oursite.com/"
append thingy $whatiwant
log "Thingy is $thingy"
HTTP::header Location $thingy
HTTP::redirect $thingy
}
}
Any ideas now?
Thanks,
Jamey
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