Re: SoupSession: "request-queued" and disabling message features



On Thu, Apr 14, 2011 at 3:03 PM, Dan Winship <danw gnome org> wrote:
>
> On 04/14/2011 05:44 PM, Kenny Sanders wrote:
> > Is it possible to hook into the "request-queued" [1] signal and then call:
> >    soup_message_disable_feature(message, SOUP_TYPE_PROXY_RESOLVER);
> > ?
> >
> > If not, is there a signal that occurs before "request-queued" so that
> > one can disable a feature like SOUP_TYPE_PROXY_RESOLVER? I've tried
> > doing it in my callback for "request-queued", but my program hangs --
>
> It should work. Can you get a stack trace of where it's hanging?

It's actually not hanging -- after using tcpdump, the request is never
being sent -- there are no outbound tcp or udp requests. According to
the documentation, you can't disable certain features _after_ queuing.
When in a callback for the 'request-queued' signal, at what stage is
the message being processed? i.e. is this immediately before the
message is queued or after the message has been queued?

Thanks,
Kenny

>
> > I'm wondering if I'm running into this issue:
> >
> > "You must call this before queueing msg on a session; calling it on a
> > message that has already been queued is undefined." [2]
>
> It's just undefined whether or not disabling it will work at that point.
> Eg, if you try to disable SOUP_TYPE_CONTENT_SNIFFER or SOUP_TYPE_LOGGER
> on a message after queueing it, it will have no effect. But it should
> work for PROXY_RESOLVER.
>
> -- Dan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]