{"thread":{"id":"5186","subject":"[PATCH] http-push: Make WebDAV work with (broken?) default apache2 WebDAV module","startedAt":"2006-08-09T18:54:23Z","lastAt":"2006-08-11T04:58:01Z","messageCount":3,"participants":["Rutger Nijlunsing","Junio C Hamano","Nick Hengeveld"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"25040","messageId":"20060809185423.GB7841@nospam.com","threadId":"5186","inReplyTo":null,"subject":"[PATCH] http-push: Make WebDAV work with (broken?) default apache2 WebDAV module","fromName":"Rutger Nijlunsing","fromEmail":"rutger@nospam.com","sentAt":"2006-08-09T18:54:23Z","receivedAt":"2006-08-09T18:54:23Z","isPatch":true,"sender":{"key":"rutger.nijlunsing@gmail.com","avatar":null},"body":"WebDAV on Debian unstable cannot handle renames on WebDAV from\nfile.ext to newfile (without ext) when newfile* already\nexists. Normally, git creates a file like 'objects/xx/sha1.token',\nwhich is renamed to 'objects/xx/sha1' when transferred completely.\n\nJust use '_' instead of '.' so WebDAV doesn't see it as an extension\nchange.\n\nSigned-off-by: Rutger Nijlunsing <git@tux.tmfweb.nl>\nAcked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n---\n http-push.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/http-push.c b/http-push.c\nindex 4021e7d..d45733e 100644\n--- a/http-push.c\n+++ b/http-push.c\n@@ -530,7 +530,7 @@ static void start_put(struct transfer_re\n \trequest->dest = xmalloc(strlen(request->url) + 14);\n \tsprintf(request->dest, \"Destination: %s\", request->url);\n \tposn += 38;\n-\t*(posn++) = '.';\n+\t*(posn++) = '_';\n \tstrcpy(posn, request->lock->token);\n \n \tslot = get_active_slot();\n-- \n1.4.2.rc2.g7cb1\n\n\n-- \nRutger Nijlunsing ---------------------------------- eludias ed dse.nl\nnever attribute to a conspiracy which can be explained by incompetence\n----------------------------------------------------------------------\n"},{"id":"25045","messageId":"7vk65h3drd.fsf@assigned-by-dhcp.cox.net","threadId":"5186","inReplyTo":"20060809185423.GB7841@nospam.com","subject":"Re: [PATCH] http-push: Make WebDAV work with (broken?) default apache2 WebDAV module","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-08-09T19:33:42Z","receivedAt":"2006-08-09T19:33:42Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Rutger Nijlunsing <rutger@nospam.com> writes:\n\n> WebDAV on Debian unstable cannot handle renames on WebDAV from\n> file.ext to newfile (without ext) when newfile* already\n> exists. Normally, git creates a file like 'objects/xx/sha1.token',\n> which is renamed to 'objects/xx/sha1' when transferred completely.\n>\n> Just use '_' instead of '.' so WebDAV doesn't see it as an extension\n> change.\n>\n> Signed-off-by: Rutger Nijlunsing <git@tux.tmfweb.nl>\n> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n\nGood problem and workaround description.  Nick, does this look\nsane to you, or is there a more kosher way to handle this?\n\n> ---\n>  http-push.c |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n>\n> diff --git a/http-push.c b/http-push.c\n> index 4021e7d..d45733e 100644\n> --- a/http-push.c\n> +++ b/http-push.c\n> @@ -530,7 +530,7 @@ static void start_put(struct transfer_re\n>  \trequest->dest = xmalloc(strlen(request->url) + 14);\n>  \tsprintf(request->dest, \"Destination: %s\", request->url);\n>  \tposn += 38;\n> -\t*(posn++) = '.';\n> +\t*(posn++) = '_';\n>  \tstrcpy(posn, request->lock->token);\n>  \n>  \tslot = get_active_slot();\n> -- \n> 1.4.2.rc2.g7cb1\n>\n>\n> -- \n> Rutger Nijlunsing ---------------------------------- eludias ed dse.nl\n> never attribute to a conspiracy which can be explained by incompetence\n> ----------------------------------------------------------------------\n"},{"id":"25123","messageId":"20060811045801.GA4544@reactrix.com","threadId":"5186","inReplyTo":"7vk65h3drd.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] http-push: Make WebDAV work with (broken?) default apache2 WebDAV module","fromName":"Nick Hengeveld","fromEmail":"nickh@reactrix.com","sentAt":"2006-08-11T04:58:01Z","receivedAt":"2006-08-11T04:58:01Z","isPatch":true,"sender":{"key":"nickh@reactrix.com","avatar":null},"body":"On Wed, Aug 09, 2006 at 12:33:42PM -0700, Junio C Hamano wrote:\n\n> > WebDAV on Debian unstable cannot handle renames on WebDAV from\n> > file.ext to newfile (without ext) when newfile* already\n> > exists. Normally, git creates a file like 'objects/xx/sha1.token',\n> > which is renamed to 'objects/xx/sha1' when transferred completely.\n> >\n> > Just use '_' instead of '.' so WebDAV doesn't see it as an extension\n> > change.\n> >\n> > Signed-off-by: Rutger Nijlunsing <git@tux.tmfweb.nl>\n> > Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n> \n> Good problem and workaround description.  Nick, does this look\n> sane to you, or is there a more kosher way to handle this?\n\nThis looks good to me - while it seems like the problem is in the DAV\nserver it also seems like problematic DAV servers will be less likely to\ntrip up on an underscore in the filename.\n\n-- \nFor a successful technology, reality must take precedence over public\nrelations, for nature cannot be fooled.\n\nThis message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.\n"}]}