Hacker Emblem

Garbled output with Apache mod_proxy

BlogNotes to Myself

  • Frontpage
  • Gallery
  • About Me

Garbled output with Apache mod_proxy

2011-08-16

Currently I am developping an application using Oracle Application Express (APEX) with Apache as reverse proxy/SSL offloader. Suddenly the application started to misbehave and instead of the rendered page the browser would show the HTML code including HTTP headers. It would happen for around 10% of the called pages and clearly needed to be addressed.

As I said the browser would not render the page but instead show HTML. The text also started with the HTTP headers generated by Oracle. Here is an excerpt of the output I got:

0
HTTP/1.1 200 OK
Server: Oracle XML DB/Oracle Database
Content-Type: text/html; charset=UTF-8
X-DB-Content-length: 24556
Transfer-Encoding: chunked

6007
<html lang="de" xmlns="http://www.w3.org/1999/xhtml" xmlns:htmldb="http://htmldb.oracle.com">
<head>
<link rel="stylesheet" href="/i/themes/theme_13/theme_4_0.css" type="text/css" />
...

At first I suspected that Apache was adding a text/plain content type to the output. I added DefaultType None to the configuration but that did not solve the problem.

The following thread gave the correct hint to finally solve the issue: http://forums.oracle.com/forums/thread.jspa?threadID=938645.

Looking at the reportedly working configuration I found out that adding the following two options to the mod_proxy configuration did indeed solve the issue for me:

SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
Posted by Stefan in Database Comment: (1) Trackbacks: (0)
Defined tags for this entry: APEX, Apache, Oracle
Possibly related articles
Logging Apache response times
Using R to visualize Oracle metrics
Another PL/SQL password generator
Oracle and Foreign Keys without Index

Trackbacks
Trackback specific URI for this entry
No Trackbacks

Comments
Display comments as (Linear | Threaded)

#1 - stephan said on 2012-02-26 10:55:

Thank’s for this post! I was looking for a solution for this problem for some time now! This seems to have positive impact on performacne also :-)
cheers,
stephan


(Reply)


Add Comment

Standard emoticons like :-) and ;-) are converted to images.
Textile-formatting allowed
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
 
Submitted comments will be subject to moderation before being displayed.
 
Syndication
  • XML RSS 1.0 feed
  • XML RSS 2.0 feed
  • ATOM/XML ATOM 1.0 feed
Tags
Apache Concepts Database Mac OpenVZ Oracle PostgreSQL R SQL Tools Tuning Unix Virtualization
Recent Posts
GNU Emacs and GPGTool on Mac
Feb 16. 2012
Universal Scalability Law in Oracle
Jan 25. 2012
Logging Apache response times
Dec 6. 2011
Metric prefixes for ggplot2 scales
Oct 7. 2011
Time Machine for Lion on FreeBSD
Sep 28. 2011
License
Creative Commons License
BlogNotes to Myself by Stefan Möding is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
 
Imprint - Privacy Policy