Manuel_Gabaldon
Jul 18, 2006Nimbostratus
Change in character set when replacing payload content
Hi, I'm using an iRule to rewrite the payload in server responses
rule rewrite host_and_paths {
when HTTP_RESPONSE {
if {([HTTP::status] == 200)
&&(([HTTP::header Content-type] starts_with "text/")
|([HTTP::header Content-type] starts_with "application/x-javascript"))}{
HTTP::collect [HTTP::header Content-Length]
}
}
Change references from apps.foo.com to www.foo.com/apps
when HTTP_RESPONSE_DATA {
set clen [HTTP::header Content-Length]
set newPayload [string map {"apps.foo.com" "www.foo.com/apps"} [HTTP::payload]]
HTTP::payload replace 0 $clen $newPayload
HTTP::release
}
}
}
For some reason, Latin characters like "é" or "ó" don't appear correctly. They only appear correctly when forcing the browser to use Unicode as character enconding.
Do you know why is this happening?
Regards.
--Manu.