mixing ipv4 and ipv6 with AnyEvent::HTTP

Marc Lehmann schmorp at schmorp.de
Mon Dec 2 07:18:57 CET 2013


On Sun, Dec 01, 2013 at 10:49:30PM +0100, Raphael Geissert <geissert at debian.org> wrote:
> On Sunday 01 December 2013 18:36:53 Marc Lehmann wrote:
> > Hmm, what makes you think they don't take redirections into
> > consideration?
> 
> Wouldn't a connection to host A via ipv4 that is in the KA_CACHE end up 
> being re-used if a connection to host B via ipv6 re-directed to host A?

Sure, but what has this to do with redirection? That happens with or
without redirections being followed.

What you describe is the persistent connection cache, which is only used
when prsistent/keepalive connections are enabled.

> It would seem to me that I'd need to provide a tcp_connect wrapper that 
> forces the lookup to be performed over v6 (or v4) AND set a different 
> sessionid for each IP family so that they are not mixed.

You keep changing your problem, or what you describe as your problem. That
makes it a bit hard to help you.

If you need to control how tcp connections are made per subrequest,
and you need to use persistency, then you indeed need to implement
redirections on your own OR you need to implement persistency on your own.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\



More information about the anyevent mailing list