Index: ChangeLog =================================================================== RCS file: /cvs/gnome/gnome-vfs/ChangeLog,v retrieving revision 1.2536 diff -u -B -r1.2536 ChangeLog --- ChangeLog 7 Nov 2006 09:26:39 -0000 1.2536 +++ ChangeLog 8 Nov 2006 19:22:30 -0000 @@ -1,3 +1,7 @@ +2006-11-08 Daniel Drake + + * modules/http-neon-method.c: Support HTTP redirects in do_create + 2006-11-07 Alexander Larsson * libgnomevfs/gnome-vfs-module-callback.c (stack_table_destroy): Index: modules/http-neon-method.c =================================================================== RCS file: /cvs/gnome/gnome-vfs/modules/http-neon-method.c,v retrieving revision 1.40 diff -u -B -r1.40 http-neon-method.c --- modules/http-neon-method.c 15 Sep 2006 19:31:00 -0000 1.40 +++ modules/http-neon-method.c 8 Nov 2006 19:22:31 -0000 @@ -2451,6 +2451,7 @@ hctx = handle->context; +put_start: req = ne_request_create (hctx->session, "PUT", hctx->path); /* Apache seems to not handle "If-None-Match: *" correctly @@ -2473,6 +2474,20 @@ ne_set_request_body_buffer (req, NULL, 0); res = ne_request_dispatch (req); + + if (res == NE_REDIRECT) { + ne_request_destroy (req); + req = NULL; + + result = http_follow_redirect (hctx); + + if (result == GNOME_VFS_OK) { + goto put_start; + } else { + return result; + } + } + result = resolve_result (res, req); ne_request_destroy (req);