Depends on how the applet is written, I&#39;d guess.  Not sure though.  However, if compression is very important and accepting gzipped content is not possible with an applet, you could gzip the files beforehand so that the files that are served are gzipped already (even though there&#39;s no Accept-Encoding header).  This would of course require that the applet decompress the text before processing, but at least you&#39;d cut down on your network traffic...<br>
<br><div class="gmail_quote">On Sat, Mar 14, 2009 at 2:58 PM, hirantha <span dir="ltr">&lt;<a href="mailto:hirantha@securedpipe.net">hirantha@securedpipe.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks guys for the replies..<div class="im"><br>
<br>
<br>
Igor Sysoev wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Sat, Mar 14, 2009 at 02:11:38AM +0530, hirantha wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi ALL,<br>
<br>
I am very new to nginx, and I found the nginx is the perfect tool for me to do reverse-proxy while compressing the data. I have successfully configured the proxy_pass and gzip configurations and it is working as I expected in test environments.<br>

<br>
We have web servers which streaming text data through java applet to the end users. Nginx is act as a reverse-proxy for back-end web servers; once the java applet loaded on the FireFox or IE browser it keep receiving data without any issue. But the problem is those text data won&#39;t get compressed though text, images etc loaded to the browser get compressed. I can compress data off the applet but once it send it to java applet, won&#39;t get compressed.<br>

</blockquote>
<br>
It seems that java applet does not send the &quot;Accept-Encoding: gzip&quot;<br>
request header.<br>
</blockquote>
<br></div>
I ran Wireshark to analyze the data on java applet and firefox browser to check what type of header request they send. Here are my findings.<br>
<br>
>From browser:<br>
GET /mbr/ds.aspx?SID=1F5AAWQWQWSA1 HTTP/1.1<br>
Host: <a href="http://data.example.com" target="_blank">data.example.com</a><br>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.7) Gecko/2009030503 Fedora/3.0.7-1.fc10 Firefox/3.0.7<br>
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8<br>
Accept-Language: en-us,en;q=0.5<br>
Accept-Encoding: gzip,deflate<br>
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7<br>
Keep-Alive: 300<br>
Connection: keep-alive<br>
<br>
<br>
>From Java applet loaded from Firefox:<br>
GET /sabb/GetUserParams.aspx?Y=BC672 HTTP/1.1<br>
User-Agent: Java(tm) 2 SDK, Standard Edition v1.6.0_0 Java/1.6.0_0<br>
Host: <a href="http://data.example.com" target="_blank">data.example.com</a><br>
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2<br>
Connection: keep-alive<br>
<br>
I think java applet don&#39;t sends Accept-Encoding header to the server; and this should be the problem. I am not a java expert and the new question, is this possible with a java applet set Accept-Encoding request header...?<div class="im">
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
BTW why do you compress image/gif image/jpeg image/png ?<br>
This is just waste of CPU time.<br>
</blockquote>
<br></div>
Yes, I have to avoid them, my concern is huge text data.<br>
<br>
Any advice on the new question is really appreciated.<br>
<br>
<br>
Regards<br><font color="#888888">
Hirantha</font><div><div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Here is my nginx.conf:<br>
<br>
http {<br>
   include       mime.types;<br>
   default_type  application/octet-stream;<br>
   sendfile        on;<br>
   keepalive_timeout  65;<br>
# compression<br>
   gzip on;<br>
   gzip_http_version 1.0;<br>
   gzip_comp_level 4;<br>
   gzip_proxied private;<br>
   gzip_min_length  1100;<br>
   gzip_buffers 16 8k;<br>
   gzip_types text/plain text/html text/css application/x-javascript \<br>
       text/xml application/xml application/xml+rss text/javascript \<br>
       image/gif image/jpeg image/png;<br>
   gzip_disable &quot;MSIE [1-6].(?!.*SV1)&quot;;<br>
   gzip_vary on;<br>
   server {<br>
       listen       80;<br>
       server_name  localhost;<br>
<br>
<br>
   location / {<br>
       proxy_pass         <a href="http://data.example.com/" target="_blank">http://data.example.com/</a>;<br>
       proxy_redirect     off;<br>
<br>
       proxy_set_header   Host             $host;<br>
       proxy_set_header   X-Real-IP        $remote_addr;<br>
       proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;<br>
       proxy_max_temp_file_size 0;<br>
<br>
       client_max_body_size       10m;<br>
       client_body_buffer_size    128k;<br>
<br>
       proxy_connect_timeout      90;<br>
       proxy_send_timeout         90;<br>
       proxy_read_timeout         90;<br>
<br>
       proxy_buffer_size          4k;<br>
       proxy_buffers              4 32k;<br>
       proxy_busy_buffers_size    64k;<br>
       proxy_temp_file_write_size 64k;<br>
<br>
       }<br>
       error_page   500 502 503 504  /50x.html;<br>
       location = /50x.html {<br>
           root   /usr/local/www/nginx-dist;<br>
       }<br>
<br>
   }<br>
<br>
<br>
I&#39;m Running on FreeBSD7.1 and I googled such scenario but no luck. To get this done where do I have to looking in to..? Any advice is really appreciated<br>
<br>
Thanks in advance<br>
Hirantha<br>
</blockquote>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br>