Hello neal,

I've notice that in a filter I have that the content length is
sometimes zero.  This never happens the first time a browser requests
a particular page but will happen each time after that if the user
hits "reload".  The browser just seems to reload from its own cache.
The browser sends the request and the server must be saying that the
content hasn't changed or something so it sends back a response with
a length of zero.  If I do a shift+reload, the the response is as I
would expect it.

The reason why I brought that up is the same thing may be happening
for you.  Maybe when the server determines that the content hasn't
changed it sends back a zero length response and, since the response
contains no content to render, the content-type isn't set?

Jake

Tuesday, November 26, 2002, 1:17:54 PM, you wrote:

n> Does anyone know of a reason why response.setContentType() would only
n> sometimes set my content type?

n> I have a single control servlet which sets content type explicitly

n> response.setContentType("text/html");

n> just before it opens an outputStream and writes an XSLT transformation to
n> out.  For 70% of my pages the contentType is correct.  For 30% of them (even
n> the pages otherwise work perfectly fine) the header info is messed up. There
n> is no contentType specified and contentLenght is 0.  Very strange. In these
n> pages (their control classes I do not do anything specific to the response
n> object that is any different from the other pages.  In the XsLTs I specify
n> output as HTML on all the pages.  Very confusing.

n> Any thoughts as to why this might happen or how to correct it?  I think it
n> may be causing me search engine indexing problems.

n> Thanks.
n> Neal 



-- 
Best regards,
 Jacob                            mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to