Changeset 34

Show
Ignore:
Timestamp:
10/25/05 17:50:15 (5 years ago)
Author:
dsandler
Message:

Fix for #18.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • feedtree/trunk/src/net/feedtree/web/WebProxyHandler.java

    r9 r34  
    5959            if (! key.equals("Connection") && ! key.equals("Accept-Encoding")) { 
    6060                cx.addRequestProperty((String)(e.getKey()), (String)(e.getValue()));             
    61             } 
    62         } 
    63         cx.setRequestProperty("Accept-Encoding", "gzip"); 
     61            } else if (key.equals("Accept-Encoding")) { 
     62                String val = (String)(e.getValue()); 
     63                if (val.contains("gzip")) { 
     64                    // Only ask for GZip if the client requested it.  
     65                    // See bug #18. 
     66                    cx.setRequestProperty("Accept-Encoding", "gzip"); 
     67                } 
     68            } 
     69        } 
    6470        cx.setRequestProperty("Connection", "close"); 
    6571        ((HttpURLConnection)cx).setRequestMethod(request.getMethod());