[JBoss JIRA] Created: (GTNPORTAL-585) Wrong content type on the login page
by jerem j (JIRA)
Wrong content type on the login page
------------------------------------
Key: GTNPORTAL-585
URL: https://jira.jboss.org/jira/browse/GTNPORTAL-585
Project: GateIn Portal
Issue Type: Bug
Environment: demo server for CMIS demo
Reporter: jerem j
On an internal server, sometimes I get the HTML of the login page displayed in text format instead of the rendered HTML.
It seems to be due to a wrong content type sent. In Firefox I get :
Date Thu, 04 Feb 2010 03:03:31 GMT
Server Apache/2.2.9 (Fedora)
Set-Cookie JSESSIONIDSSO=CD538AAD44F3B33DD9E213B6CC9ABD07; Expires=Thu, 01-Jan-1970 00:00:10 GMT
Pragma No-cache
Cache-Control no-cache
Expires Thu, 01 Jan 1970 00:00:00 UTC
Vary Accept-Encoding
Content-Encoding gzip
Connection close
Transfer-Encoding chunked
Content-Type text/plain; charset=UTF-8
using the w3c validator I'm also getting a content type text/plain
But using CURL, i'm getting the good header :
$ curl -I http://xxx.exoplatform.org/portal/private/classic/Dashboard
HTTP/1.1 200 OK
Date: Thu, 04 Feb 2010 03:03:54 GMT
Server: Apache/2.2.9 (Fedora)
Set-Cookie: JSESSIONID=EBEAAA2E6A42B34D1F99F58F0E421D62; Path=/portal
Cache-Control: no-cache
Content-Length: 42912
Vary: Accept-Encoding
Connection: close
Content-Type: text/html;charset=UTF-8
$
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 2 months
[JBoss JIRA] Created: (GTNPORTAL-603) Use httpResponse.setContentType("text/html; charset=UTF-8"); in login form
by Marek Posolda (JIRA)
Use httpResponse.setContentType("text/html; charset=UTF-8"); in login form
--------------------------------------------------------------------------
Key: GTNPORTAL-603
URL: https://jira.jboss.org/jira/browse/GTNPORTAL-603
Project: GateIn Portal
Issue Type: Feature Request
Environment: Ubuntu linux,
Sun JDK 1.6,
GateIn portal from revision 1460 deployed on EAP 5.0.0.GA,
Apache/2.0.52 with mod_jk/1.2.28
Reporter: Marek Posolda
Attachments: login-page_apache-lb.png
I think that content type should be explicitly set in login.jsp or in class org.exoplatform.web.login.InitiateLoginServlet. Right now, almost all GateIn pages have correctly set HTTP header Content-Type in HTTP response. But this is not the case for page with login form. Header Content-Type is not set in HTTP response from this page.
This is not the issue if you are sending HTTP requests via your browser directly to GateIn portal, but can be the issue in some special cases. For example if Apache HTTPD is used as loadbalancer and cluster with GateIn portal servers is behind it. Apache HTTPD attaches header "Content-Type" in case that this header is not set from backend application. And by default it set the header to text/plain. Result is that I can see only HTML code in my browser in that case (see screenshot).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 2 months