Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty Client 9 for Iudex crawler

Hi,

On Wed, Dec 12, 2012 at 10:30 PM, David Kellum <dek94@xxxxxxxxxxxxx> wrote:
> Saw this in the blog post summary. It begs the question: Is the request
> actually aborted, and connection freed, in the case of this Future.get()
> timeout?

Yes it is.

>> or via the utility class TimedResponseListener for asynchronous usage.
>> So, idleTimeout and the global timeout have 2 different meanings: you
>> can have a slow connection that sends 1 byte every second, so the
>> idleTimeout never fires, but the total timeout does fire.
>
> I am using it async, and this was the case that had me concerned about
> the seemingly missing global timeout.  Adding a doc section on timeouts
> might help others.

I did; will be there in the next documentation build.

> Looking at TimedResponseListener implementation:
> shouldn't it cancel itself in onComplete()? I can't find any caller of
> Schedulable.cancel() in M3?

It is called from HttpExchange.

> I was under the impression that there was certain error conditions with
> idempotent requests that the retry feature of client 7.x could
> automatically recover from.  An example might be if a (i.e. keep-alive)
> socket is closed while sending the request? Or am I misunderstanding
> what enabling this feature does in 7.x?

Well, I have not found yet a use case where you want this to be
completely automatic... I am open to hear though.
Yes there are idempotent requests but they are kind of rare and it's
very easy to redo them manually upon failure.

> OK I'll wait for M4 before investigating cookie support further. I'd
> like to disable cookies with M3, but it looks like this (per doc) is
> only on master as well?
>
> httpClient.setCookieStore(new CookieStore.Empty());
>
> Though I can't find an Empty class in java.net either?

No it's not in java.net; the old docs refer to
org.eclipse.jetty.client.api.CookieStore, which is now gone in favor
of java.net.CookieStore.
I also updated the documentation for the current master, but if you
can't wait the build, read here:
https://github.com/jetty-project/jetty-documentation/blob/master/src/docbkx/clients/http/http-client-other.xml
To disable cookies, or filter them, search for "disable cookie
handling" and "enable cookie filtering".

Simon
--
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.
----
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless.   Victoria Livschitz


Back to the top