Wildfly 8.2 on Openshift: plain text response instead of html on page reload

238 Views Asked by At

I'm facing a weird issue on Wildfly 8.2 (1 small gear, OpenJDK "1.7.0_79") on Openshift, when I try to reload/refresh a page in the browser:

Sometimes the response is rendered as (Content-Type) text/plain instead of text/html. Browser output:

0
HTTP/1.1 200 OK
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache, no-store
X-Powered-By: Undertow/1
Server: WildFly/8
Pragma: no-cache
Date: Fri, 26 Jun 2015 10:54:58 GMT
Connection: keep-alive
Transfer-Encoding: chunked
Content-Type: text/html;charset=UTF-8

0dec 
<!DOCTYPE html>
...
</html>
0

with response headers:

HTTP/1.1 200 OK
Date: Fri, 26 Jun 2015 10:54:58 GMT
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/plain

There are no errors which could cause this behavior in my application (Wicket 6.19.0; there are no exceptions in the log, no entities are serialized etc.). Also the content of the page is correct, only the Content-Type is wrong.

I was trying to reproduce this issue with a simple jsp page. When the jsp is compiled as a servlet for the first time, WildFly will also return text/plain instead of html.

Is someone facing the same issue?

Why a wrong Content-Type is returned and why it is happening (irregularly) only on page-reload?

Can I fix it with Wicket (e.x. by setting the Content-Type on the WebResponse although I'm confident this is not the problem and Wicket is doing this anyway)?

Thanks in advance for any help.

0

There are 0 best solutions below