changeset 2366:f0a895a1e50d

- Add final part for proxy auth handling
author Ralf Ertzinger <ralf@skytale.net>
date Fri, 08 Feb 2008 12:11:13 +0100
parents 8326592d3d35
children 04a5792e0c0f
files src/neon/neon.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/neon/neon.c	Wed Feb 06 04:28:39 2008 +0100
+++ b/src/neon/neon.c	Fri Feb 08 12:11:13 2008 +0100
@@ -559,6 +559,15 @@
         ret = NE_REDIRECT;
     }
 
+    if ((NE_OK == ret) && (407 == status->code)) {
+        /*
+         * Proxy auth required. Reconnect to authenticate
+         */
+        _DEBUG("Reconnecting due to 407");
+        ne_end_request(handle->request);
+        ret = ne_begin_request(handle->request);
+    }
+
     switch (ret) {
         case NE_OK:
             /* URL opened OK */