You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Johnny Six <jo...@gmail.com> on 2012/10/30 20:44:35 UTC

Re: PDF Download problem tomcat >= 7.0.27


It looks like Tomcat7 is munging the content-type header.
The correct response header should be:

  Content-Type: multipart/byteranges; boundary=CATALINA_MIME_BOUNDARY   <<
good
  Content-Type: multipart/byteranges;boundary=CATALINA_MIME_BOUNDARY    <<
bad

Where there needs to be a space after the ';' character.
In my code, i am setting these values by hand, via setHeader,
but Tomcat7 seems to parse it and remove the space (don't know why). 

If i downgrade to Tomcat6, this problem goes away, and i get the right
headers again,
exactly as what i set them to be.

Tomcat team needs to probably fix this bug.  



Michele Mase' wrote:
> 
> I've the following problem: the server is running tomcat 7.0.27 (but also
> with 7.0.28 and 7.0.29) and from the client (ie + acrobat 9) when opening
> some pdf docs I receive an error complaining about a network error:
> 
> "A network error occured while accessing this document on interntet. Would
> you like to close the document or reload it?"
> 
> Reverting back to 7.0.26 the problem disappears ...
> 
> The connector is the http bio
> 
> 
> This is one public pdf that caused me the error when i put it on a tomcat
>>=7.0.27
> 
> http://www.regione.fvg.it/rafvg/export/sites/default/RAFVG/formazione-lavoro/agenzia-regionale-lavoro/allegati/joblab_2.0_scheda_tematica_1_FR.pdf
> 
> 
> What happened to the bio connector under the 7.0.27 version that could
> cause the issue?
> 
> The connector uses the standard roles, for example:
> 
> <Connector port="8080" protocol="HTTP/1.1"
>                connectionTimeout="20000"
>                redirectPort="8443" compression="off"/>
> 
> 
> Regards
> 
> Michele Maè
> 
> 

-- 
View this message in context: http://old.nabble.com/PDF-Download-problem-tomcat-%3E%3D-7.0.27-tp34229642p34621346.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: PDF Download problem tomcat >= 7.0.27

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Johnny Six [mailto:johnny6cheung@gmail.com] 
> Subject: Re: PDF Download problem tomcat >= 7.0.27

> It looks like Tomcat7 is munging the content-type header.
> The correct response header should be:
>   Content-Type: multipart/byteranges; boundary=CATALINA_MIME_BOUNDARY   <<
> good
>   Content-Type: multipart/byteranges;boundary=CATALINA_MIME_BOUNDARY    <<
> bad

> Where there needs to be a space after the ';' character.

No, there doesn't; read the HTTP spec.  There is a bug in the Adobe plugin for IE that fails to follow the specification, but Adobe is so far ignoring the problem.  Search the archives for a discussion.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: PDF Download problem tomcat >= 7.0.27

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Johnny,

On 10/30/12 3:44 PM, Johnny Six wrote:
> It looks like Tomcat7 is munging the content-type header. The
> correct response header should be:
> 
> Content-Type: multipart/byteranges; boundary=CATALINA_MIME_BOUNDARY
> << good Content-Type:
> multipart/byteranges;boundary=CATALINA_MIME_BOUNDARY    << bad
> 
> Where there needs to be a space after the ';' character.

Says who?

> In my code, i am setting these values by hand, via setHeader, but
> Tomcat7 seems to parse it and remove the space (don't know why).
> 
> If i downgrade to Tomcat6, this problem goes away, and i get the
> right headers again, exactly as what i set them to be.

Those headers are equivalent.

> Tomcat team needs to probably fix this bug.

Feel free to read the rest of this thread before you say stupid things
like this publicly.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCRUOsACgkQ9CaO5/Lv0PBmPgCeNyiJOEfJ3TSeokAWaTJSXdRf
sl8AoKR4VrEo6SXvEkBP31OrzT9ahAXU
=3xqa
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org