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



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?

> 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]