[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16089042#comment-16089042
 ] 

Philipp Katz edited comment on HTTPCLIENT-1643 at 7/16/17 6:35 PM:
-------------------------------------------------------------------

Thanks for the feedback. Understand these concerns, but they currently are be 
the most convenient fix to my issue! :)

Anyways, I've just double-checked and HttpClient 4.5+ indeed implements the fix 
as described above. The issue in my case was, that my Maven Wagon version was 
still using an older version of the HttpClient library. So, apologies for the 
false alarm!

[edit] In case that should be relevant to anybody later...: My fix was adding 
the following part to my {{pom.xml}}. This way explicitly a more recent version 
of the maven wagon-http plugin is used, which in turn uses the more recent 
HttpClient dependency:

{code}
  <build>
    <!-- using either the lightweight, or a more recent
    wagon-http implementation fixes the problem -->
    <extensions>
      <!-- <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-http-lightweight</artifactId>
        <version>2.2</version>
      </extension> -->
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-http</artifactId>
        <version>2.12</version>
      </extension>
    </extensions>
{code}


was (Author: qqilihq):
Thanks for the feedback. Understand these concerns, but they currently are be 
the most convenient fix to my issue! :)

Anyways, I've just double-checked and HttpClient 4.5+ indeed implements the fix 
as described above. The issue in my case was, that my Maven Wagon version was 
still using an older version of the HttpClient library. So, apologies for the 
false alarm!

In case that should be relevant to anybody later. My fix was adding the 
following part to my {{pom.xml}}. This way explicitly a more recent version of 
the maven wagon-http plugin is used, which in turn uses the more recent 
HttpClient dependency:

{code}
  <build>
    <!-- using either the lightweight, or a more recent
    wagon-http implementation fixes the problem -->
    <extensions>
      <!-- <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-http-lightweight</artifactId>
        <version>2.2</version>
      </extension> -->
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-http</artifactId>
        <version>2.12</version>
      </extension>
    </extensions>
{code}

> More tolerant handling of unsupported Content-Coding
> ----------------------------------------------------
>
>                 Key: HTTPCLIENT-1643
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1643
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient (classic)
>    Affects Versions: 4.4.1
>            Reporter: Julien Nioche
>            Priority: Minor
>             Fix For: 4.5
>
>
> The following URL can be fetched by curl 
> {code}
> curl -I http://meta.ats.hrsmart.com/cgi-bin/a/alljobs.cgi
> HTTP/1.1 200 OK
> Date: Wed, 22 Apr 2015 15:49:52 GMT
> Server: Apache/1.3.33 (Debian GNU/Linux) mod_throttle/3.1.2 PHP/4.3.10-15 
> mod_ssl/2.8.22 OpenSSL/0.9.7e
> P3P: CP="CAO DSP COR CUR HIS OUR IND STA"
> Content-Type: text/html; charset=iso-8859-1
> Content-Encoding: script 
> {code}
> but not by HttpClient as the Content-Encoding value returned by the server is 
> invalid. This results in a org.apache.http.client.ClientProtocolException 
> being thrown.
> Instead of failing the whole fetch, couldn't you treat an illegal value like 
> this to be empty or have a default value?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to