Forum Discussion
Manuel_Gabaldon
Nimbostratus
Jul 18, 2006Change 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.
- hoolio
Cirrostratus
Out of curiosity, what encoding is the response using? - Manuel_Gabaldon
Nimbostratus
It is using ISO-8859-1, as specified in the Content-Type header. - Colin_Walker_12Historic F5 AccountI believe I've seen a previous posting that listed a similar side-effect. I'll try and track down other similar examples. If there's a trend, I'll see if I can look into this a bit further and get you an answer.
- Tomasz_Radzisze
Nimbostratus
I'm facing similar problem. I've posted more on this subject here : http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&tpage=1&view=topic&postid=722815878
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