Knowledge Share: apache agent return text/html; charset=iso-8859-1

Discussion created by CloudFans Employee on Aug 15, 2013
Latest reply on Aug 28, 2013 by Tsai_Hsing
If you are Asian customer of Siteminder, and using apache 2.x, my test result will help you understand why setting to UTF-8 in httpd.conf won't work.

My test is on R12 SP3 and R12.5 agents.

Test 1:
1. enableWebAgent= No
2. Save and restart web server.
3 Test login.fcc
character is correct.

HTTP/1.1 200 OK
Date: Thu, 25 Jul 2013 15:01:24 GMT
Server: Apache/2.2.22 (Win32) mod_ssl/2.2.22 OpenSSL/0.9.8t
Last-Modified: Tue, 23 Jul 2013 04:10:17 GMT
ETag: "6000000008331-1ca0-4e225f88032c5"
Accept-Ranges: bytes
Content-Length: 7328
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html

Test 2:
1. enableWebAgent= yes
2. Test with login.fcc
Fiddler showed web server return:
HTTP/1.1 200 OK
Date: Tue, 23 Jul 2013 05:43:07 GMT
Server: Apache/2.2.22 (Win32) mod_ssl/2.2.22 OpenSSL/0.9.8t
Cache-Control: no-store
Content-Length: 7333
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1

This is Apache 2.x web server limitations. The issue can not be resolved in the Apache 2.x web agent.
Apache provides three ways to set the charset for HTML pages returned by
the web server:
- Set the Apache server directive AddDefaultCharset in the httpd.conf file.
- Set the Apache server directive AddCharset in the httpd.conf file.
- Set the content type associated with the HTTP request in an Apache
filter, such as the SiteMinder WebAgent.

Regardless of what method is used to set the charset the server sets or
resets the content type from "text/html" or "text/html;charset=******" to

A work around for this issue is to modify the apache server code in
File: http_protocol.c
Function: ap_send_error_response(request_rec *r, int recursive_error)
Fix: Replace
ap_set_content_type(r, "text/html; charset=iso-8859-1");
ap_set_content_type(r, "text/html");