[
https://issues.apache.org/jira/browse/HTTPCLIENT-1643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16089003#comment-16089003
]
Philipp Katz commented on HTTPCLIENT-1643:
------------------------------------------
I'm having the very same issue. Is this fix already present in the 4.5.3
version?
As far as I got from the last comments, HttpClient should now handle (ignore)
headers such as {{Content-Encoding: None}} without throwing any exceptions,
right?
I'm still getting:
{code}
Could not get content
org.apache.maven.wagon.TransferFailedException
at
org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:1085)
at
org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:977)
at
org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
at
com.googlecode.download.maven.plugin.internal.WGet.doGet(WGet.java:366)
at
com.googlecode.download.maven.plugin.internal.WGet.execute(WGet.java:276)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by:
org.apache.maven.wagon.providers.http.httpclient.client.ClientProtocolException
at
org.apache.maven.wagon.providers.http.httpclient.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
at
org.apache.maven.wagon.providers.http.httpclient.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at
org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:848)
at
org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:1000)
... 27 more
Caused by: org.apache.maven.wagon.providers.http.httpclient.HttpException:
Unsupported Content-Coding: None
at
org.apache.maven.wagon.providers.http.httpclient.client.protocol.ResponseContentEncoding.process(ResponseContentEncoding.java:98)
at
org.apache.maven.wagon.providers.http.httpclient.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:139)
at
org.apache.maven.wagon.providers.http.httpclient.impl.execchain.ProtocolExec.execute(ProtocolExec.java:200)
at
org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec.execute(RetryExec.java:86)
at
org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
at
org.apache.maven.wagon.providers.http.httpclient.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
... 30 more
{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]