[evolution-ews] Bug 732850 - Not all message restarts are due to a	redirect
- From: David Woodhouse <dwmw2 src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [evolution-ews] Bug 732850 - Not all message restarts are due to a	redirect
 
- Date: Thu, 24 Jul 2014 11:53:41 +0000 (UTC)
 
commit 00d3d92ffdd50caac1fa80a083a0d38c5bfcdb5c
Author: Daniel Sands <dnsands sandia gov>
Date:   Tue Jul 22 17:05:55 2014 +0100
    Bug 732850 - Not all message restarts are due to a redirect
    
    Not all reposts are due to redirects, so the post_restarted callback
    should check the message status before assuming so.  In this case,
    reposts happen because of GSSAPI negotiation.
    
    [dwmw2: The primary motivation for fixing this was apparently because of
            the bare 'printf' in it. Perhaps *removing* that might also be
            appropriate...]
 src/server/e-ews-connection.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index d5c9ab7..5637047 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -2648,6 +2648,10 @@ static void post_restarted (SoupMessage *msg, gpointer data)
 {
        xmlOutputBuffer *buf = data;
 
+       /* Not all restarts are due to a redirect; some are for auth */
+       if (msg->status_code == 401)
+               return;
+
        /* In violation of RFC2616, libsoup will change a POST request to
         * a GET on receiving a 302 redirect. */
        printf ("Working around libsoup bug with redirect\n");
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]