You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Todd Simons <ts...@delphi-tech.com> on 2010/10/20 17:50:48 UTC

[users@httpd] MOD_PROXY Open CSV Content Into Excel

Hello All
We develop web applications using Weblogic and JSP pages.   Our web app has the functionality to export to excel where data is pulled from a database and presented to the web client, at that point the web client recognizes the content stream and opens excel with the CSV file.   The code from the JSP page is below:

      response.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT");
    response.setHeader("Cache-control", "no-store, no-cache, must-revalidate");
    response.addHeader("Cache-Control", "post-check=0, pre-check=0");
    response.setHeader("Content-Type", "text/html; charset=" + encoding);
    response.setHeader("Pragma", "no-cache");
            response.setHeader("Content-Disposition", dispType + "; filename=grid.csv");

        Where
                dispType = "attachment"
                encoding = "UTF-8"

When accessing the Web app directly, this works great, but when accessing  through an Apache Reverse Proxy, the CSV content is displayed in the browser window.

Our Reverse Proxy settings are listed below.
<!--http.conf snip-->
ProxyRequests Off
ProxyPreserveHost Off


ProxyPass /app/ http://internalhost/app/
ProxyPassReverse /app/ http://internalhost/app/
<Proxy "https://*/app/*">
        Order deny,allow
        Deny from All
        #Allow from Us
        Allow from 10.0.0.0/20
        #Allow from Customer
        Allow from 162.x.x.x/24
</Proxy>
<!--http.conf snip-->



Has anyone seen this before?


_______________________________________
Todd Simons
Principal IT Engineer
tsimons@*.com



  ________________________________
CONFIDENTIALITY NOTICE
This e-mail message from Delphi Technology, Inc. is intended only for the individual or entity to which it is addressed. This e-mail may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you received this e-mail by accident, please notify the sender immediately and destroy this e-mail and all copies of it.

Re: [users@httpd] MOD_PROXY Open CSV Content Into Excel

Posted by Rainer Jung <ra...@kippdata.de>.
On 20.10.2010 17:50, Todd Simons wrote:
>
> Hello All
> We develop web applications using Weblogic and JSP pages. Our web app
> has the functionality to export to excel where data is pulled from a
> database and presented to the web client, at that point the web client
> recognizes the content stream and opens excel with the CSV file. The
> code from the JSP page is below:
> response.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT");
> response.setHeader("Cache-control", "no-store, no-cache, must-revalidate");
> response.addHeader("Cache-Control", "post-check=0, pre-check=0");
> response.setHeader("Content-Type", "text/html; charset=" + encoding);
> response.setHeader("Pragma", "no-cache");
> response.setHeader("Content-Disposition", dispType + ";
> filename=grid.csv");
> Where
> dispType = "attachment"
> encoding = " UTF-8 "
> When accessing the Web app directly, this works great, but when
> accessing through an Apache Reverse Proxy, the CSV content is displayed
> in the browser window.
> Our Reverse Proxy settings are listed below.
> <!-—http.conf snip-->
> ProxyRequests Off
> ProxyPreserveHost Off
> ProxyPass /app/ http://internalhost/app/
> ProxyPassReverse /app/ http:// internalhost / app /
> <http://internalhost/app/>
> <Proxy "https://*/app/*">
> Order deny,allow
> Deny from All
> #Allow from Us
> Allow from 10. 0 .0.0/20
> #Allow from Customer
> Allow from 162. x . x.x /24
> </Proxy>
> <!-—http.conf snip-->
> Has anyone seen this before?

Can you check the headers that are sent to the browser by using a 
browser plugin (Firefox: Firebug etc., MSIE: Fiddler etc.). Any 
differences between direct access and proxy?

Regards,

Rainer

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org