Forum Discussion
BenT
Altocumulus
Nov 12, 2013ProxyPass V10 bug
I've noticed a bug in the way some stream rewrites are being done. If the replacement content is within a uri, this function will cut off the part before the matching string as described in the debug...
Simon_Kowallik1
Nov 12, 2013Historic F5 Account
try with this code block:
Fix Location, Content-Location, and URI headers
foreach header { "Location" "Content-Location" "URI"} {
set protocol [URI::protocol [HTTP::header $header]]
if { $static::ProxyPassDebug > 1 } {
log local0. "$log_prefix: Checking $header=[HTTP::header $header], \$protocol=$protocol"
}
if {$protocol ne ""} {
set server_path [findstr [HTTP::header $header] $host_serverside [string length $host_serverside]]
if {$server_path starts_with $path_serverside} {
if {[HTTP::header $header] starts_with "$protocol://$host_serverside"} {
if { $static::ProxyPassDebug } {
log local0. "$log_prefix: Changing response header $header: [HTTP::header $header] with $protocol://$host_clientside$path_clientside[substr $server_path [string length $path_serverside]]"
}
HTTP::header replace $header $protocol://$host_clientside$path_clientside[substr $server_path [string length $path_serverside]]
} else {
if { $static::ProxyPassDebug } {
set hdr_rplc [string map "$host_serverside $host_clientside $path_serverside $path_clientside" [HTTP::header $header]]
log local0. "$log_prefix: Changing response header $header: [HTTP::header $header] with $hdr_rplc"
unset hdr_rplc
}
HTTP::header replace $header [string map "$host_serverside $host_clientside $path_serverside $path_clientside" [HTTP::header $header]]
}
}
}
}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