After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 574773 - Add API to disable SoupSessionFeatures from SoupMessages
Add API to disable SoupSessionFeatures from SoupMessages
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: API
2.25.x
Other Linux
: Normal enhancement
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
: 590436 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-03-10 15:44 UTC by Emilio Pozuelo Monfort
Modified: 2009-08-09 15:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add soup_message_disable_feature() (9.59 KB, patch)
2009-08-02 15:36 UTC, Dan Winship
none Details | Review

Description Emilio Pozuelo Monfort 2009-03-10 15:44:49 UTC
Hi,

I have the use case of not wanting to use the proxy settings for certain messages. Right now I'm using another session that doesn't have a proxy to do it, but I think it makes sense to have a SOUP_MESSAGE_NO_PROXY flag for that purpose.
Comment 1 Dan Winship 2009-03-10 16:14:23 UTC
As discussed on IRC, I'm not totally sure this is the right solution. Then again, it's VERY similar to the existing NO_REDIRECT flag, so...

Maybe what we really need is a per-message way to disable particular session features, so you can queue a message without proxy resolution, or without cookies, or without authentication, or (eventually) without Content-Encoding support, etc.
Comment 2 Emilio Pozuelo Monfort 2009-03-10 16:41:48 UTC
Retitling, as discussed on IRC.

The API to disable some SoupSessionFeatures from SoupMessages sounds good and would solve my use cases (not only this one but another with SoupCookieJar). As talked on IRC, a possibility of the public API would be something like

soup_message_disable_feature (msg, SOUP_TYPE_PROXY_RESOLVER)

danw> SoupMessagePrivate would have a GSList or something of disabled features, and the session would call soup_message_get_disabled_features() or whatever
Comment 3 Dan Winship 2009-08-02 15:36:27 UTC
Created attachment 139740 [details] [review]
Add soup_message_disable_feature()

This allows you to disable specific SoupSessionFeatures for particular
messages.

Also update tests/sniffing-test to test it out.
Comment 4 Dan Winship 2009-08-02 15:37:05 UTC
*** Bug 590436 has been marked as a duplicate of this bug. ***
Comment 5 Dan Winship 2009-08-09 15:03:18 UTC
committed