WebSphere HTTP Server - Preventing IBM Http Server from adding Response Headers - PDF problem

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere HTTP Server > February 2006 > Preventing IBM Http Server from adding Response Headers - PDF problem





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Preventing IBM Http Server from adding Response Headers - PDF problem

2006-02-08, 7:50 am

Hi,

I am trying to stream a PDF to the browser from a servlet. In the servlet I have added appropriate Content type like application/pdf. This response header is working fine on the test servers without HTTP Server. But, on the client side, there is a IBM HTT
P server and WebSphere App Server combination. When I get the response there, I am getting the gzip encoded pdf stream along with cache-control: no-cache header. We have not written these headers in our servlet, I am sure this is coming from the IBM HTTP
Server. Both of these headers are causing problem -
GZIP causes a racing condition between Internet Explorer and Adobe Acrobat (Ver 6 and 7), giving an error "File is already in use by another user". By making Internet explorer to use HTTP 1.0, GZIP goes off because Accept-Encoding will not go in request h
eader from Browser for HTTP 1.0. But, the cache-control remains, causing problem - "Internet explorer cannot download TestPDFServlet from localhost"(server name) dialog, as per my understanding this comes when byte stream comes to browser and there is no-
cache header.

How do we disable both of these option at the server side (atleast cache). Following is the response header I am getting -

HTTP/1.1 200 OK
Date: Mon, 30 Jan 2006 11:31:37 GMT
Server: IBM_HTTP_Server/2.0.47.1 Apache/2.0.47 (Unix) DAV/2
Set-Cookie: CLT=129.42.125.193.1138620697393388; path=/
Set-Cookie: JSESSIONID=00002QWNuS9v3NQBcFoV_Ww1LL6:1
0h9so4kj;Path=/
Cache-Control: no-cache="set-cookie,set-cookie2"
Expires: Thu, 01 Dec 1994 16:00:00 GMT
widget: printLossContact
Vary: Accept-Encoding
Content-Encoding: gzip
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=ISO-8859-1

text/html is again coming from some server setting. This is still ok since Acrobat 7 still opens by understanding the byte. This we have tested here.

Any help is really appreciated.

Sunit Patke

2006-02-08, 7:50 am

Is this MIME type (pdf) configured in WAS? Check in admin console or the
plugin configuration.

Sunit

<dinakargop@yahoo.com> wrote in message
news:1457124596.1139393981961.JavaMail.wassrvr@ltsgwas007.sby.ibm.com...
> Hi,
>
> I am trying to stream a PDF to the browser from a servlet. In the servlet
> I have added appropriate Content type like application/pdf. This response
> header is working fine on the test servers without HTTP Server. But, on
> the client side, there is a IBM HTTP server and WebSphere App Server
> combination. When I get the response there, I am getting the gzip encoded
> pdf stream along with cache-control: no-cache header. We have not written
> these headers in our servlet, I am sure this is coming from the IBM HTTP
> Server. Both of these headers are causing problem -
> GZIP causes a racing condition between Internet Explorer and Adobe Acrobat
> (Ver 6 and 7), giving an error "File is already in use by another user".
> By making Internet explorer to use HTTP 1.0, GZIP goes off because
> Accept-Encoding will not go in request header from Browser for HTTP 1.0.
> But, the cache-control remains, causing problem - "Internet explorer
> cannot download TestPDFServlet from localhost"(server name) dialog, as per
> my understanding this comes when byte stream comes to browser and there is
> no-cache header.
>
> How do we disable both of these option at the server side (atleast cache).
> Following is the response header I am getting -
>
> HTTP/1.1 200 OK
> Date: Mon, 30 Jan 2006 11:31:37 GMT
> Server: IBM_HTTP_Server/2.0.47.1 Apache/2.0.47 (Unix) DAV/2
> Set-Cookie: CLT=129.42.125.193.1138620697393388; path=/
> Set-Cookie: JSESSIONID=00002QWNuS9v3NQBcFoV_Ww1LL6:1
0h9so4kj;Path=/
> Cache-Control: no-cache="set-cookie,set-cookie2"
> Expires: Thu, 01 Dec 1994 16:00:00 GMT
> widget: printLossContact
> Vary: Accept-Encoding
> Content-Encoding: gzip
> Keep-Alive: timeout=15, max=100
> Connection: Keep-Alive
> Transfer-Encoding: chunked
> Content-Type: text/html; charset=ISO-8859-1
>
> text/html is again coming from some server setting. This is still ok since
> Acrobat 7 still opens by understanding the byte. This we have tested here.
>
> Any help is really appreciated.
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com