• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Accept compresed requests in tomcat

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have tomcat configurate to send responses compresed with gzip if the cliente send me the Accept-encoding:gzip http header.

But how allow tomcat to accept compressed request with Content-encoding: gzip header?

Thanks
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think Tomcat has the capability to unzip request information.
What type of requests are you making that would be large enough to benefit from such capability?
 
alain martin
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have to send a lot of data in a GPRS line...

Any one can confirm it isn't possible?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by alain martin:
I have to send a lot of data in a GPRS line...

Any one can confirm it isn't possible?



What is GPRS?
Do you already have a client that can send compressed data?
[ October 25, 2007: Message edited by: Ben Souther ]
 
alain martin
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
gprs
http://en.wikipedia.org/wiki/General_Packet_Radio_Service

Yes I have the client
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you already have the server application or is this something you're writing yourself?

In either case, it shouldn't be that difficult to implement this yourself by writing either a servlet filter or a Tomcat valve.
 
alain martin
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the server application
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look in the java.util.zip package for classes that can handle GZIP encoding.

Seems to me a Filter that can look at the headers of an incoming request and substitute an unzipping InputStream when needed could be used without any modification to actual server code. There are plenty of filter examples around - but they mostly deal with zipping the output to the response.

Bill
 
alain martin
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, but I hope tomcat had native support of it
 
reply
    Bookmark Topic Watch Topic
  • New Topic