You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Michael Osipov <mi...@apache.org> on 2020/02/16 22:30:25 UTC

Fail non-repeatable requests when following redirects

Folks,

I am working again on some stuff in Maven Wagon, WAGON-570. After some 
tests I do not understand why this does not fail:

> main] DEBUG org.apache.http.headers - http-outgoing-0 >> PUT /test-secured-put-resource HTTP/1.1
> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Cache-control: no-cache
> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Cache-store: no-store
> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Pragma: no-cache
> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Content-Length: 14
> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Host: localhost:49248
> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Connection: Keep-Alive
> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> User-Agent: Apache-HttpClient/4.5.11 (Java/1.7.0_252)
> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Accept-Encoding: gzip,deflate
> #[main] DEBUG org.apache.http.headers - http-outgoing-0 << HTTP/1.1 303 See Other
> [main] DEBUG org.apache.http.headers - http-outgoing-0 << Date: Sun, 16 Feb 2020 22:26:39 GMT
> [main] DEBUG org.apache.http.headers - http-outgoing-0 << Location: http://localhost:49243/test-secured-put-resource
> [main] DEBUG org.apache.http.headers - http-outgoing-0 << Content-Length: 0
> [main] DEBUG org.apache.http.headers - http-outgoing-0 << Server: Jetty(9.2.24.v20180105)
> [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Connection can be kept alive indefinitely
> [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection [id: 0][route: {}->http://localhost:49248] can be kept alive indefinitely
> [main] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-0: set socket timeout to 0
> [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection released: [id: 0][route: {}->http://localhost:49248][total available: 1; route allocated: 1 of 20; total allocated: 1 of 40]
> [main] DEBUG org.apache.http.impl.execchain.RedirectExec - Resetting target auth state
> [main] DEBUG org.apache.http.impl.execchain.RedirectExec - Redirecting to 'http://localhost:49243/test-secured-put-resource' via {}->http://localhost:49243
> [main] DEBUG org.apache.http.client.protocol.RequestAddCookies - CookieSpec selected: compatibility
> [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection request: [route: {}->http://localhost:49243][total available: 1; route allocated: 0 of 20; total allocated: 1 of 40]
> [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection leased: [id: 1][route: {}->http://localhost:49243][total available: 1; route allocated: 1 of 20; total allocated: 2 of 40]
> [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Opening connection {}->http://localhost:49243
> [main] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOperator - Connecting to localhost/127.0.0.1:49243
> [main] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOperator - Connection established 127.0.0.1:49254<->127.0.0.1:49243
> [main] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-1: set socket timeout to 1800000
> [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Executing request PUT /test-secured-put-resource HTTP/1.1
> [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Target auth state: UNCHALLENGED
> [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Proxy auth state: UNCHALLENGED
> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> PUT /test-secured-put-resource HTTP/1.1
> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Cache-control: no-cache
> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Cache-store: no-store
> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Pragma: no-cache
> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Content-Length: 14
> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Host: localhost:49243
> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Connection: Keep-Alive
> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> User-Agent: Apache-HttpClient/4.5.11 (Java/1.7.0_252)
> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Accept-Encoding: gzip,deflate
> [qtp582804106-15] WARN org.eclipse.jetty.server.HttpChannel - /test-secured-put-resource
> java.io.IOException: java.util.concurrent.TimeoutException: Idle timeout expired: 30021/30000 ms
> 	at org.eclipse.jetty.util.SharedBlockingCallback$Blocker.block(SharedBlockingCallback.java:213)
> 	at org.eclipse.jetty.server.HttpInputOverHTTP.blockForContent(HttpInputOverHTTP.java:66)
> 	at org.eclipse.jetty.server.HttpInput$1.waitForContent(HttpInput.java:489)
> 	at org.eclipse.jetty.server.HttpInput.read(HttpInput.java:122)
> 	at java.io.InputStream.read(InputStream.java:101)
> 	at org.codehaus.plexus.util.IOUtil.copy(IOUtil.java:169)
> 	at org.codehaus.plexus.util.IOUtil.copy(IOUtil.java:156)
> 	at org.apache.maven.wagon.http.HttpWagonTestCase$PutHandler.handle(HttpWagonTestCase.java:2124)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
> 	at org.eclipse.jetty.server.Server.handle(Server.java:499)
> 	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
> 	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
> 	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
> 	at java.lang.Thread.run(Thread.java:748)
> Caused by: java.util.concurrent.TimeoutException: Idle timeout expired: 30021/30000 ms
> 	at org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:161)
> 	at org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:473)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
> 	... 1 more
> [main] DEBUG org.apache.http.headers - http-outgoing-1 << HTTP/1.1 500 java.util.concurrent.TimeoutException: Idle timeout expired: 30021/30000 ms
> [main] DEBUG org.apache.http.headers - http-outgoing-1 << Date: Sun, 16 Feb 2020 22:26:39 GMT
> [main] DEBUG org.apache.http.headers - http-outgoing-1 << Cache-Control: must-revalidate,no-cache,no-store
> [main] DEBUG org.apache.http.headers - http-outgoing-1 << Content-Type: text/html; charset=ISO-8859-1
> [main] DEBUG org.apache.http.headers - http-outgoing-1 << Content-Length: 369
> [main] DEBUG org.apache.http.headers - http-outgoing-1 << Connection: close
> [main] DEBUG org.apache.http.headers - http-outgoing-1 << Server: Jetty(9.2.24.v20180105)


The supplied entity is non-repeatable, DefaultRedirectStrategy has been 
instructed to retry the PUT for this case. 
(https://github.com/apache/maven-wagon/commit/58a646776fa4811090063360e80280e21287e92b)

For some strange reason the PUT is retried although the entity is 
unusable. The peer (server) fails with request timeout. I would expect 
this to behave like the RetryHandler. If it cannot be retried, fail.

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Fail non-repeatable requests when following redirects

Posted by Michael Osipov <mi...@apache.org>.
Am 2020-02-17 um 14:11 schrieb Oleg Kalnichevski:
> On Sun, 2020-02-16 at 23:30 +0100, Michael Osipov wrote:
>> Folks,
>>
>> I am working again on some stuff in Maven Wagon, WAGON-570. After
>> some
>> tests I do not understand why this does not fail:
>>
>>> main] DEBUG org.apache.http.headers - http-outgoing-0 >> PUT /test-
>>> secured-put-resource HTTP/1.1
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Cache-
>>> control: no-cache
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Cache-
>>> store: no-store
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Pragma:
>>> no-cache
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Content-
>>> Length: 14
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Host:
>>> localhost:49248
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 >>
>>> Connection: Keep-Alive
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> User-
>>> Agent: Apache-HttpClient/4.5.11 (Java/1.7.0_252)
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Accept-
>>> Encoding: gzip,deflate
>>> #[main] DEBUG org.apache.http.headers - http-outgoing-0 << HTTP/1.1
>>> 303 See Other
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 << Date:
>>> Sun, 16 Feb 2020 22:26:39 GMT
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 << Location:
>>> http://localhost:49243/test-secured-put-resource
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 << Content-
>>> Length: 0
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 << Server:
>>> Jetty(9.2.24.v20180105)
>>> [main] DEBUG org.apache.http.impl.execchain.MainClientExec -
>>> Connection can be kept alive indefinitely
>>> [main] DEBUG
>>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager -
>>> Connection [id: 0][route: {}->http://localhost:49248] can be kept
>>> alive indefinitely
>>> [main] DEBUG
>>> org.apache.http.impl.conn.DefaultManagedHttpClientConnection -
>>> http-outgoing-0: set socket timeout to 0
>>> [main] DEBUG
>>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager -
>>> Connection released: [id: 0][route: {}->
>>> http://localhost:49248][total available: 1; route allocated: 1 of
>>> 20; total allocated: 1 of 40]
>>> [main] DEBUG org.apache.http.impl.execchain.RedirectExec -
>>> Resetting target auth state
>>> [main] DEBUG org.apache.http.impl.execchain.RedirectExec -
>>> Redirecting to 'http://localhost:49243/test-secured-put-resource'
>>> via {}->http://localhost:49243
>>> [main] DEBUG org.apache.http.client.protocol.RequestAddCookies -
>>> CookieSpec selected: compatibility
>>> [main] DEBUG
>>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager -
>>> Connection request: [route: {}->http://localhost:49243][total
>>> available: 1; route allocated: 0 of 20; total allocated: 1 of 40]
>>> [main] DEBUG
>>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager -
>>> Connection leased: [id: 1][route: {}->http://localhost:49243][total
>>>   available: 1; route allocated: 1 of 20; total allocated: 2 of 40]
>>> [main] DEBUG org.apache.http.impl.execchain.MainClientExec -
>>> Opening connection {}->http://localhost:49243
>>> [main] DEBUG
>>> org.apache.http.impl.conn.DefaultHttpClientConnectionOperator -
>>> Connecting to localhost/127.0.0.1:49243
>>> [main] DEBUG
>>> org.apache.http.impl.conn.DefaultHttpClientConnectionOperator -
>>> Connection established 127.0.0.1:49254<->127.0.0.1:49243
>>> [main] DEBUG
>>> org.apache.http.impl.conn.DefaultManagedHttpClientConnection -
>>> http-outgoing-1: set socket timeout to 1800000
>>> [main] DEBUG org.apache.http.impl.execchain.MainClientExec -
>>> Executing request PUT /test-secured-put-resource HTTP/1.1
>>> [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Target
>>> auth state: UNCHALLENGED
>>> [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Proxy
>>> auth state: UNCHALLENGED
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> PUT
>>> /test-secured-put-resource HTTP/1.1
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Cache-
>>> control: no-cache
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Cache-
>>> store: no-store
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Pragma:
>>> no-cache
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Content-
>>> Length: 14
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Host:
>>> localhost:49243
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 >>
>>> Connection: Keep-Alive
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> User-
>>> Agent: Apache-HttpClient/4.5.11 (Java/1.7.0_252)
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Accept-
>>> Encoding: gzip,deflate
>>> [qtp582804106-15] WARN org.eclipse.jetty.server.HttpChannel -
>>> /test-secured-put-resource
>>> java.io.IOException: java.util.concurrent.TimeoutException: Idle
>>> timeout expired: 30021/30000 ms
>>> 	at
>>> org.eclipse.jetty.util.SharedBlockingCallback$Blocker.block(SharedB
>>> lockingCallback.java:213)
>>> 	at
>>> org.eclipse.jetty.server.HttpInputOverHTTP.blockForContent(HttpInpu
>>> tOverHTTP.java:66)
>>> 	at
>>> org.eclipse.jetty.server.HttpInput$1.waitForContent(HttpInput.java:
>>> 489)
>>> 	at org.eclipse.jetty.server.HttpInput.read(HttpInput.java:122)
>>> 	at java.io.InputStream.read(InputStream.java:101)
>>> 	at org.codehaus.plexus.util.IOUtil.copy(IOUtil.java:169)
>>> 	at org.codehaus.plexus.util.IOUtil.copy(IOUtil.java:156)
>>> 	at
>>> org.apache.maven.wagon.http.HttpWagonTestCase$PutHandler.handle(Htt
>>> pWagonTestCase.java:2124)
>>> 	at
>>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapp
>>> er.java:97)
>>> 	at org.eclipse.jetty.server.Server.handle(Server.java:499)
>>> 	at
>>> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
>>> 	at
>>> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.j
>>> ava:258)
>>> 	at
>>> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.ja
>>> va:544)
>>> 	at
>>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadP
>>> ool.java:635)
>>> 	at
>>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPo
>>> ol.java:555)
>>> 	at java.lang.Thread.run(Thread.java:748)
>>> Caused by: java.util.concurrent.TimeoutException: Idle timeout
>>> expired: 30021/30000 ms
>>> 	at
>>> org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:
>>> 161)
>>> 	at org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50)
>>> 	at
>>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:
>>> 473)
>>> 	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>>> 	at
>>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTas
>>> k.access$201(ScheduledThreadPoolExecutor.java:178)
>>> 	at
>>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTas
>>> k.run(ScheduledThreadPoolExecutor.java:292)
>>> 	at
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecuto
>>> r.java:1152)
>>> 	at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecut
>>> or.java:622)
>>> 	... 1 more
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 << HTTP/1.1
>>> 500 java.util.concurrent.TimeoutException: Idle timeout expired:
>>> 30021/30000 ms
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 << Date:
>>> Sun, 16 Feb 2020 22:26:39 GMT
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 << Cache-
>>> Control: must-revalidate,no-cache,no-store
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 << Content-
>>> Type: text/html; charset=ISO-8859-1
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 << Content-
>>> Length: 369
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 <<
>>> Connection: close
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 << Server:
>>> Jetty(9.2.24.v20180105)
>>
>>
>> The supplied entity is non-repeatable, DefaultRedirectStrategy has
>> been
>> instructed to retry the PUT for this case.
>> (
>> https://github.com/apache/maven-wagon/commit/58a646776fa4811090063360e80280e21287e92b
>> )
>>
>> For some strange reason the PUT is retried although the entity is
>> unusable. The peer (server) fails with request timeout. I would
>> expect
>> this to behave like the RetryHandler. If it cannot be retried, fail.
>>
>> Michael
> 
> Hi Michael
> 
> I can take a look. Is there a test case I could run locally to
> reproduce the defect?

FWIW, HttpClient 5.0 properly fails with:
> [main] DEBUG org.apache.hc.client5.http.impl.classic.RedirectExec - ex-00000001: cannot redirect non-repeatable request

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Fail non-repeatable requests when following redirects

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2020-02-18 at 19:48 +0100, Michael Osipov wrote:
> > > 

...


> Am 2020-02-18 um 10:50 schrieb Oleg Kalnichevski:
> > On Mon, 2020-02-17 at 15:29 +0100, Michael Osipov wrote:
> Sure, I have uploaded webapp.war. Please deploy it as usual on
> Tomcat 
> and put it as JAR on Tomcat's classpath because the integrated valve 
> must be on Tomcat's classpath.
> 
> The perform a PUT to /webapp/repo/....
> 

This line in Test2 gives me grief:

private static final Path MAVEN_CENTRAL = Paths.get("C:\\Users\\mosipov\\.m2\\repository");

But I think this is enough to see the problem and debug HttpClient.

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Fail non-repeatable requests when following redirects

Posted by Michael Osipov <mi...@apache.org>.
Am 2020-02-18 um 10:50 schrieb Oleg Kalnichevski:
> On Mon, 2020-02-17 at 15:29 +0100, Michael Osipov wrote:
>> Am 2020-02-17 um 14:11 schrieb Oleg Kalnichevski:
>>> On Sun, 2020-02-16 at 23:30 +0100, Michael Osipov wrote:
>>>> Folks,
>>>>
>>>> I am working again on some stuff in Maven Wagon, WAGON-570. After
>>>> some
>>>> tests I do not understand why this does not fail:
>>>>
>>>
>>> ...
>>>> The supplied entity is non-repeatable, DefaultRedirectStrategy
>>>> has
>>>> been
>>>> instructed to retry the PUT for this case.
>>>> (
>>>>
> https://github.com/apache/maven-wagon/commit/58a646776fa4811090063360e80280e21287e92b
>>>> )
>>>>
>>>> For some strange reason the PUT is retried although the entity is
>>>> unusable. The peer (server) fails with request timeout. I would
>>>> expect
>>>> this to behave like the RetryHandler. If it cannot be retried,
>>>> fail.
>>>>
>>>> Michael
>>>
>>> Hi Michael
>>>
>>> I can take a look. Is there a test case I could run locally to
>>> reproduce the defect?
>>
>> Alright, I have now a reduced test case here:
>> https://home.apache.org/~michaelo/issues/httpclient-redirect/
>>
>> The ZIP file contains a sample code RedirectMain.java which
>> reproduces
>> Wagon's behavior. Test2.java is a simple servlet running on tomcat
>> 8.5.51 here and accepting GET and PUT requests. out.log contains the
>> output of HttpClient and the failure.
>>
>> My expectation would be HttpClient to fail with an expecption that
>> the
>> request cannot be retried because the input stream has already been
>> consumed.
>>
>> Michael
> 
>> Michael
> 
> Could you also pack your server side code into a WAR, please? I have no
> idea what I need to do about web-fragment.xml

Sure, I have uploaded webapp.war. Please deploy it as usual on Tomcat 
and put it as JAR on Tomcat's classpath because the integrated valve 
must be on Tomcat's classpath.

The perform a PUT to /webapp/repo/....

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Fail non-repeatable requests when following redirects

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2020-02-17 at 15:29 +0100, Michael Osipov wrote:
> Am 2020-02-17 um 14:11 schrieb Oleg Kalnichevski:
> > On Sun, 2020-02-16 at 23:30 +0100, Michael Osipov wrote:
> > > Folks,
> > > 
> > > I am working again on some stuff in Maven Wagon, WAGON-570. After
> > > some
> > > tests I do not understand why this does not fail:
> > > 
> > 
> > ...
> > > The supplied entity is non-repeatable, DefaultRedirectStrategy
> > > has
> > > been
> > > instructed to retry the PUT for this case.
> > > (
> > > 
https://github.com/apache/maven-wagon/commit/58a646776fa4811090063360e80280e21287e92b
> > > )
> > > 
> > > For some strange reason the PUT is retried although the entity is
> > > unusable. The peer (server) fails with request timeout. I would
> > > expect
> > > this to behave like the RetryHandler. If it cannot be retried,
> > > fail.
> > > 
> > > Michael
> > 
> > Hi Michael
> > 
> > I can take a look. Is there a test case I could run locally to
> > reproduce the defect?
> 
> Alright, I have now a reduced test case here: 
> https://home.apache.org/~michaelo/issues/httpclient-redirect/
> 
> The ZIP file contains a sample code RedirectMain.java which
> reproduces 
> Wagon's behavior. Test2.java is a simple servlet running on tomcat 
> 8.5.51 here and accepting GET and PUT requests. out.log contains the 
> output of HttpClient and the failure.
> 
> My expectation would be HttpClient to fail with an expecption that
> the 
> request cannot be retried because the input stream has already been 
> consumed.
> 
> Michael

> Michael

Could you also pack your server side code into a WAR, please? I have no
idea what I need to do about web-fragment.xml

Oleg  




---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Fail non-repeatable requests when following redirects

Posted by Michael Osipov <mi...@apache.org>.
Am 2020-02-17 um 14:11 schrieb Oleg Kalnichevski:
> On Sun, 2020-02-16 at 23:30 +0100, Michael Osipov wrote:
>> Folks,
>>
>> I am working again on some stuff in Maven Wagon, WAGON-570. After
>> some
>> tests I do not understand why this does not fail:
>>
> ...
>> The supplied entity is non-repeatable, DefaultRedirectStrategy has
>> been
>> instructed to retry the PUT for this case.
>> (
>> https://github.com/apache/maven-wagon/commit/58a646776fa4811090063360e80280e21287e92b
>> )
>>
>> For some strange reason the PUT is retried although the entity is
>> unusable. The peer (server) fails with request timeout. I would
>> expect
>> this to behave like the RetryHandler. If it cannot be retried, fail.
>>
>> Michael
> 
> Hi Michael
> 
> I can take a look. Is there a test case I could run locally to
> reproduce the defect?

Alright, I have now a reduced test case here: 
https://home.apache.org/~michaelo/issues/httpclient-redirect/

The ZIP file contains a sample code RedirectMain.java which reproduces 
Wagon's behavior. Test2.java is a simple servlet running on tomcat 
8.5.51 here and accepting GET and PUT requests. out.log contains the 
output of HttpClient and the failure.

My expectation would be HttpClient to fail with an expecption that the 
request cannot be retried because the input stream has already been 
consumed.

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Fail non-repeatable requests when following redirects

Posted by Michael Osipov <mi...@apache.org>.
Am 2020-02-20 um 22:24 schrieb Oleg Kalnichevski:
> On Thu, 2020-02-20 at 19:46 +0100, Michael Osipov wrote:
>> Am 2020-02-19 um 13:42 schrieb Oleg Kalnichevski:
>>> ...
>>>
>>>>> Hi Michael
>>>>>
>>>>> I can take a look. Is there a test case I could run locally to
>>>>> reproduce the defect?
>>>>
>>>> I will try to skim this out of Wagon. Meanwhile I have attached
>>>> the
>>>> failure with Wagon. You'll see that HttpClient follows the
>>>> redirect,
>>>> but
>>>> is stuck (checksum files which from from input streams) and
>>>> Tomcat
>>>> fails
>>>> with a timeout.
>>>>
>>>> Michael
>>>
>>> Please review
>>>
>>> https://github.com/apache/httpcomponents-client/pull/213
>>
>> I have a left a comment on the PR. It causes, unfortunately, a
>> regression :-(
>>
> 
> I am aware. I will look into it. But I need to improve our test
> coverage before proceeding.

I have reported this not to lose track: HTTPCLIENT-2052

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Fail non-repeatable requests when following redirects

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2020-02-20 at 19:46 +0100, Michael Osipov wrote:
> Am 2020-02-19 um 13:42 schrieb Oleg Kalnichevski:
> > ...
> > 
> > > > Hi Michael
> > > > 
> > > > I can take a look. Is there a test case I could run locally to
> > > > reproduce the defect?
> > > 
> > > I will try to skim this out of Wagon. Meanwhile I have attached
> > > the
> > > failure with Wagon. You'll see that HttpClient follows the
> > > redirect,
> > > but
> > > is stuck (checksum files which from from input streams) and
> > > Tomcat
> > > fails
> > > with a timeout.
> > > 
> > > Michael
> > 
> > Please review
> > 
> > https://github.com/apache/httpcomponents-client/pull/213
> 
> I have a left a comment on the PR. It causes, unfortunately, a 
> regression :-(
> 

I am aware. I will look into it. But I need to improve our test
coverage before proceeding.

Oleg 



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Fail non-repeatable requests when following redirects

Posted by Michael Osipov <mi...@apache.org>.
Am 2020-02-19 um 13:42 schrieb Oleg Kalnichevski:
> ...
> 
>>> Hi Michael
>>>
>>> I can take a look. Is there a test case I could run locally to
>>> reproduce the defect?
>>
>> I will try to skim this out of Wagon. Meanwhile I have attached the
>> failure with Wagon. You'll see that HttpClient follows the redirect,
>> but
>> is stuck (checksum files which from from input streams) and Tomcat
>> fails
>> with a timeout.
>>
>> Michael
> 
> Please review
> 
> https://github.com/apache/httpcomponents-client/pull/213

I have a left a comment on the PR. It causes, unfortunately, a 
regression :-(

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Fail non-repeatable requests when following redirects

Posted by Oleg Kalnichevski <ol...@apache.org>.
...

> > Hi Michael
> > 
> > I can take a look. Is there a test case I could run locally to
> > reproduce the defect?
> 
> I will try to skim this out of Wagon. Meanwhile I have attached the 
> failure with Wagon. You'll see that HttpClient follows the redirect,
> but 
> is stuck (checksum files which from from input streams) and Tomcat
> fails 
> with a timeout.
> 
> Michael

Please review 

https://github.com/apache/httpcomponents-client/pull/213

Oleg




---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Fail non-repeatable requests when following redirects

Posted by Michael Osipov <mi...@apache.org>.
Am 2020-02-17 um 14:11 schrieb Oleg Kalnichevski:
> On Sun, 2020-02-16 at 23:30 +0100, Michael Osipov wrote:
>> Folks,
>>
>> I am working again on some stuff in Maven Wagon, WAGON-570. After
>> some
>> tests I do not understand why this does not fail:
>>
>>> main] DEBUG org.apache.http.headers - http-outgoing-0 >> PUT /test-
>>> secured-put-resource HTTP/1.1
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Cache-
>>> control: no-cache
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Cache-
>>> store: no-store
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Pragma:
>>> no-cache
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Content-
>>> Length: 14
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Host:
>>> localhost:49248
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 >>
>>> Connection: Keep-Alive
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> User-
>>> Agent: Apache-HttpClient/4.5.11 (Java/1.7.0_252)
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Accept-
>>> Encoding: gzip,deflate
>>> #[main] DEBUG org.apache.http.headers - http-outgoing-0 << HTTP/1.1
>>> 303 See Other
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 << Date:
>>> Sun, 16 Feb 2020 22:26:39 GMT
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 << Location:
>>> http://localhost:49243/test-secured-put-resource
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 << Content-
>>> Length: 0
>>> [main] DEBUG org.apache.http.headers - http-outgoing-0 << Server:
>>> Jetty(9.2.24.v20180105)
>>> [main] DEBUG org.apache.http.impl.execchain.MainClientExec -
>>> Connection can be kept alive indefinitely
>>> [main] DEBUG
>>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager -
>>> Connection [id: 0][route: {}->http://localhost:49248] can be kept
>>> alive indefinitely
>>> [main] DEBUG
>>> org.apache.http.impl.conn.DefaultManagedHttpClientConnection -
>>> http-outgoing-0: set socket timeout to 0
>>> [main] DEBUG
>>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager -
>>> Connection released: [id: 0][route: {}->
>>> http://localhost:49248][total available: 1; route allocated: 1 of
>>> 20; total allocated: 1 of 40]
>>> [main] DEBUG org.apache.http.impl.execchain.RedirectExec -
>>> Resetting target auth state
>>> [main] DEBUG org.apache.http.impl.execchain.RedirectExec -
>>> Redirecting to 'http://localhost:49243/test-secured-put-resource'
>>> via {}->http://localhost:49243
>>> [main] DEBUG org.apache.http.client.protocol.RequestAddCookies -
>>> CookieSpec selected: compatibility
>>> [main] DEBUG
>>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager -
>>> Connection request: [route: {}->http://localhost:49243][total
>>> available: 1; route allocated: 0 of 20; total allocated: 1 of 40]
>>> [main] DEBUG
>>> org.apache.http.impl.conn.PoolingHttpClientConnectionManager -
>>> Connection leased: [id: 1][route: {}->http://localhost:49243][total
>>>   available: 1; route allocated: 1 of 20; total allocated: 2 of 40]
>>> [main] DEBUG org.apache.http.impl.execchain.MainClientExec -
>>> Opening connection {}->http://localhost:49243
>>> [main] DEBUG
>>> org.apache.http.impl.conn.DefaultHttpClientConnectionOperator -
>>> Connecting to localhost/127.0.0.1:49243
>>> [main] DEBUG
>>> org.apache.http.impl.conn.DefaultHttpClientConnectionOperator -
>>> Connection established 127.0.0.1:49254<->127.0.0.1:49243
>>> [main] DEBUG
>>> org.apache.http.impl.conn.DefaultManagedHttpClientConnection -
>>> http-outgoing-1: set socket timeout to 1800000
>>> [main] DEBUG org.apache.http.impl.execchain.MainClientExec -
>>> Executing request PUT /test-secured-put-resource HTTP/1.1
>>> [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Target
>>> auth state: UNCHALLENGED
>>> [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Proxy
>>> auth state: UNCHALLENGED
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> PUT
>>> /test-secured-put-resource HTTP/1.1
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Cache-
>>> control: no-cache
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Cache-
>>> store: no-store
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Pragma:
>>> no-cache
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Content-
>>> Length: 14
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Host:
>>> localhost:49243
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 >>
>>> Connection: Keep-Alive
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> User-
>>> Agent: Apache-HttpClient/4.5.11 (Java/1.7.0_252)
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Accept-
>>> Encoding: gzip,deflate
>>> [qtp582804106-15] WARN org.eclipse.jetty.server.HttpChannel -
>>> /test-secured-put-resource
>>> java.io.IOException: java.util.concurrent.TimeoutException: Idle
>>> timeout expired: 30021/30000 ms
>>> 	at
>>> org.eclipse.jetty.util.SharedBlockingCallback$Blocker.block(SharedB
>>> lockingCallback.java:213)
>>> 	at
>>> org.eclipse.jetty.server.HttpInputOverHTTP.blockForContent(HttpInpu
>>> tOverHTTP.java:66)
>>> 	at
>>> org.eclipse.jetty.server.HttpInput$1.waitForContent(HttpInput.java:
>>> 489)
>>> 	at org.eclipse.jetty.server.HttpInput.read(HttpInput.java:122)
>>> 	at java.io.InputStream.read(InputStream.java:101)
>>> 	at org.codehaus.plexus.util.IOUtil.copy(IOUtil.java:169)
>>> 	at org.codehaus.plexus.util.IOUtil.copy(IOUtil.java:156)
>>> 	at
>>> org.apache.maven.wagon.http.HttpWagonTestCase$PutHandler.handle(Htt
>>> pWagonTestCase.java:2124)
>>> 	at
>>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapp
>>> er.java:97)
>>> 	at org.eclipse.jetty.server.Server.handle(Server.java:499)
>>> 	at
>>> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
>>> 	at
>>> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.j
>>> ava:258)
>>> 	at
>>> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.ja
>>> va:544)
>>> 	at
>>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadP
>>> ool.java:635)
>>> 	at
>>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPo
>>> ol.java:555)
>>> 	at java.lang.Thread.run(Thread.java:748)
>>> Caused by: java.util.concurrent.TimeoutException: Idle timeout
>>> expired: 30021/30000 ms
>>> 	at
>>> org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:
>>> 161)
>>> 	at org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50)
>>> 	at
>>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:
>>> 473)
>>> 	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>>> 	at
>>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTas
>>> k.access$201(ScheduledThreadPoolExecutor.java:178)
>>> 	at
>>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTas
>>> k.run(ScheduledThreadPoolExecutor.java:292)
>>> 	at
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecuto
>>> r.java:1152)
>>> 	at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecut
>>> or.java:622)
>>> 	... 1 more
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 << HTTP/1.1
>>> 500 java.util.concurrent.TimeoutException: Idle timeout expired:
>>> 30021/30000 ms
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 << Date:
>>> Sun, 16 Feb 2020 22:26:39 GMT
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 << Cache-
>>> Control: must-revalidate,no-cache,no-store
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 << Content-
>>> Type: text/html; charset=ISO-8859-1
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 << Content-
>>> Length: 369
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 <<
>>> Connection: close
>>> [main] DEBUG org.apache.http.headers - http-outgoing-1 << Server:
>>> Jetty(9.2.24.v20180105)
>>
>>
>> The supplied entity is non-repeatable, DefaultRedirectStrategy has
>> been
>> instructed to retry the PUT for this case.
>> (
>> https://github.com/apache/maven-wagon/commit/58a646776fa4811090063360e80280e21287e92b
>> )
>>
>> For some strange reason the PUT is retried although the entity is
>> unusable. The peer (server) fails with request timeout. I would
>> expect
>> this to behave like the RetryHandler. If it cannot be retried, fail.
>>
>> Michael
> 
> Hi Michael
> 
> I can take a look. Is there a test case I could run locally to
> reproduce the defect?

I will try to skim this out of Wagon. Meanwhile I have attached the 
failure with Wagon. You'll see that HttpClient follows the redirect, but 
is stuck (checksum files which from from input streams) and Tomcat fails 
with a timeout.

Michael

Re: Fail non-repeatable requests when following redirects

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Sun, 2020-02-16 at 23:30 +0100, Michael Osipov wrote:
> Folks,
> 
> I am working again on some stuff in Maven Wagon, WAGON-570. After
> some 
> tests I do not understand why this does not fail:
> 
> > main] DEBUG org.apache.http.headers - http-outgoing-0 >> PUT /test-
> > secured-put-resource HTTP/1.1
> > [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Cache-
> > control: no-cache
> > [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Cache-
> > store: no-store
> > [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Pragma:
> > no-cache
> > [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Content-
> > Length: 14
> > [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Host:
> > localhost:49248
> > [main] DEBUG org.apache.http.headers - http-outgoing-0 >>
> > Connection: Keep-Alive
> > [main] DEBUG org.apache.http.headers - http-outgoing-0 >> User-
> > Agent: Apache-HttpClient/4.5.11 (Java/1.7.0_252)
> > [main] DEBUG org.apache.http.headers - http-outgoing-0 >> Accept-
> > Encoding: gzip,deflate
> > #[main] DEBUG org.apache.http.headers - http-outgoing-0 << HTTP/1.1
> > 303 See Other
> > [main] DEBUG org.apache.http.headers - http-outgoing-0 << Date:
> > Sun, 16 Feb 2020 22:26:39 GMT
> > [main] DEBUG org.apache.http.headers - http-outgoing-0 << Location:
> > http://localhost:49243/test-secured-put-resource
> > [main] DEBUG org.apache.http.headers - http-outgoing-0 << Content-
> > Length: 0
> > [main] DEBUG org.apache.http.headers - http-outgoing-0 << Server:
> > Jetty(9.2.24.v20180105)
> > [main] DEBUG org.apache.http.impl.execchain.MainClientExec -
> > Connection can be kept alive indefinitely
> > [main] DEBUG
> > org.apache.http.impl.conn.PoolingHttpClientConnectionManager -
> > Connection [id: 0][route: {}->http://localhost:49248] can be kept
> > alive indefinitely
> > [main] DEBUG
> > org.apache.http.impl.conn.DefaultManagedHttpClientConnection -
> > http-outgoing-0: set socket timeout to 0
> > [main] DEBUG
> > org.apache.http.impl.conn.PoolingHttpClientConnectionManager -
> > Connection released: [id: 0][route: {}->
> > http://localhost:49248][total available: 1; route allocated: 1 of
> > 20; total allocated: 1 of 40]
> > [main] DEBUG org.apache.http.impl.execchain.RedirectExec -
> > Resetting target auth state
> > [main] DEBUG org.apache.http.impl.execchain.RedirectExec -
> > Redirecting to 'http://localhost:49243/test-secured-put-resource'
> > via {}->http://localhost:49243
> > [main] DEBUG org.apache.http.client.protocol.RequestAddCookies -
> > CookieSpec selected: compatibility
> > [main] DEBUG
> > org.apache.http.impl.conn.PoolingHttpClientConnectionManager -
> > Connection request: [route: {}->http://localhost:49243][total
> > available: 1; route allocated: 0 of 20; total allocated: 1 of 40]
> > [main] DEBUG
> > org.apache.http.impl.conn.PoolingHttpClientConnectionManager -
> > Connection leased: [id: 1][route: {}->http://localhost:49243][total
> >  available: 1; route allocated: 1 of 20; total allocated: 2 of 40]
> > [main] DEBUG org.apache.http.impl.execchain.MainClientExec -
> > Opening connection {}->http://localhost:49243
> > [main] DEBUG
> > org.apache.http.impl.conn.DefaultHttpClientConnectionOperator -
> > Connecting to localhost/127.0.0.1:49243
> > [main] DEBUG
> > org.apache.http.impl.conn.DefaultHttpClientConnectionOperator -
> > Connection established 127.0.0.1:49254<->127.0.0.1:49243
> > [main] DEBUG
> > org.apache.http.impl.conn.DefaultManagedHttpClientConnection -
> > http-outgoing-1: set socket timeout to 1800000
> > [main] DEBUG org.apache.http.impl.execchain.MainClientExec -
> > Executing request PUT /test-secured-put-resource HTTP/1.1
> > [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Target
> > auth state: UNCHALLENGED
> > [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Proxy
> > auth state: UNCHALLENGED
> > [main] DEBUG org.apache.http.headers - http-outgoing-1 >> PUT
> > /test-secured-put-resource HTTP/1.1
> > [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Cache-
> > control: no-cache
> > [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Cache-
> > store: no-store
> > [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Pragma:
> > no-cache
> > [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Content-
> > Length: 14
> > [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Host:
> > localhost:49243
> > [main] DEBUG org.apache.http.headers - http-outgoing-1 >>
> > Connection: Keep-Alive
> > [main] DEBUG org.apache.http.headers - http-outgoing-1 >> User-
> > Agent: Apache-HttpClient/4.5.11 (Java/1.7.0_252)
> > [main] DEBUG org.apache.http.headers - http-outgoing-1 >> Accept-
> > Encoding: gzip,deflate
> > [qtp582804106-15] WARN org.eclipse.jetty.server.HttpChannel -
> > /test-secured-put-resource
> > java.io.IOException: java.util.concurrent.TimeoutException: Idle
> > timeout expired: 30021/30000 ms
> > 	at
> > org.eclipse.jetty.util.SharedBlockingCallback$Blocker.block(SharedB
> > lockingCallback.java:213)
> > 	at
> > org.eclipse.jetty.server.HttpInputOverHTTP.blockForContent(HttpInpu
> > tOverHTTP.java:66)
> > 	at
> > org.eclipse.jetty.server.HttpInput$1.waitForContent(HttpInput.java:
> > 489)
> > 	at org.eclipse.jetty.server.HttpInput.read(HttpInput.java:122)
> > 	at java.io.InputStream.read(InputStream.java:101)
> > 	at org.codehaus.plexus.util.IOUtil.copy(IOUtil.java:169)
> > 	at org.codehaus.plexus.util.IOUtil.copy(IOUtil.java:156)
> > 	at
> > org.apache.maven.wagon.http.HttpWagonTestCase$PutHandler.handle(Htt
> > pWagonTestCase.java:2124)
> > 	at
> > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapp
> > er.java:97)
> > 	at org.eclipse.jetty.server.Server.handle(Server.java:499)
> > 	at
> > org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
> > 	at
> > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.j
> > ava:258)
> > 	at
> > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.ja
> > va:544)
> > 	at
> > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadP
> > ool.java:635)
> > 	at
> > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPo
> > ol.java:555)
> > 	at java.lang.Thread.run(Thread.java:748)
> > Caused by: java.util.concurrent.TimeoutException: Idle timeout
> > expired: 30021/30000 ms
> > 	at
> > org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:
> > 161)
> > 	at org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50)
> > 	at
> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:
> > 473)
> > 	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> > 	at
> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTas
> > k.access$201(ScheduledThreadPoolExecutor.java:178)
> > 	at
> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTas
> > k.run(ScheduledThreadPoolExecutor.java:292)
> > 	at
> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecuto
> > r.java:1152)
> > 	at
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecut
> > or.java:622)
> > 	... 1 more
> > [main] DEBUG org.apache.http.headers - http-outgoing-1 << HTTP/1.1
> > 500 java.util.concurrent.TimeoutException: Idle timeout expired:
> > 30021/30000 ms
> > [main] DEBUG org.apache.http.headers - http-outgoing-1 << Date:
> > Sun, 16 Feb 2020 22:26:39 GMT
> > [main] DEBUG org.apache.http.headers - http-outgoing-1 << Cache-
> > Control: must-revalidate,no-cache,no-store
> > [main] DEBUG org.apache.http.headers - http-outgoing-1 << Content-
> > Type: text/html; charset=ISO-8859-1
> > [main] DEBUG org.apache.http.headers - http-outgoing-1 << Content-
> > Length: 369
> > [main] DEBUG org.apache.http.headers - http-outgoing-1 <<
> > Connection: close
> > [main] DEBUG org.apache.http.headers - http-outgoing-1 << Server:
> > Jetty(9.2.24.v20180105)
> 
> 
> The supplied entity is non-repeatable, DefaultRedirectStrategy has
> been 
> instructed to retry the PUT for this case. 
> (
> https://github.com/apache/maven-wagon/commit/58a646776fa4811090063360e80280e21287e92b
> )
> 
> For some strange reason the PUT is retried although the entity is 
> unusable. The peer (server) fails with request timeout. I would
> expect 
> this to behave like the RetryHandler. If it cannot be retried, fail.
> 
> Michael

Hi Michael

I can take a look. Is there a test case I could run locally to
reproduce the defect?

Oleg  



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org