GNOME Bugzilla – Bug 681493
Add a way to avoid need_new_connection
Last modified: 2012-08-20 10:25:59 UTC
As we spoke with Dan on IRC, the POST method is not considered idempotent (it is not part of SOUP_METHOD_IS_IDEMPOTENT() macro), thus when using it, then even with idle connection it cannot be reused and libsoup keeps to reconnect to the server, which is unnecessary and only slows down things. Testing with my server suggests that adding the POST to idempotent macro works as expected. Looking around, I guess POST is also safe (SOUP_METHOD_IS_SAFE()), isn't it?
Created attachment 220760 [details] [review] lsp patch for libsoup; Here's a patch for it, which also fixes a header define to correspond to file name. I looked on SOUP_METHOD_IS_SAFE() usage and the POST doesn't belong there, thus I didn't change that part (and I also answered my above question).
Comment on attachment 220760 [details] [review] lsp patch (as discussed in email)
Responding to your email here: > With respect of conflict resolution after POST, exchange servers use > ChangeKey on items/folders, which is mandatory on certain operations, > and it's used to ensure that the caller modifies what he/she wants to > modify. Thus they manage conflicts on their side. So I guess we want a SoupMessageFlag for this... SOUP_MESSAGE_IDEMPOTENT I guess? > Thinking of it, the GET is not idempotent in your definition too in > certain cases. Yes, but it's *supposed* to be according to the spec, and it's considered a bug when it's not...
(In reply to comment #3) > So I guess we want a SoupMessageFlag for this... SOUP_MESSAGE_IDEMPOTENT I > guess? Yes, that will make it too. I can add it to evolution-ews, when you'll have it in sources. Do you want me to create the right patch?
Sure. (Preferably as a "git format-patch" style patch.)
Created attachment 221015 [details] [review] proposed lsp patch ][ for libsoup; Here you are. I noticed that with this patch I end up with SoupSocket 2, instead of 1 for some reason (in debug logs of libsoup), I guess it's because of NTLM? Though I think I saw only 1 socket being used with the previous patch. Anyway, this is still much better than before.
pushed with slightly-edited docs and commit message
Thanks.