Re: [PATCH] http-push: Make WebDAV work with (broken?) default apache2 WebDAV module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rutger Nijlunsing <rutger@xxxxxxxxxx> writes:

> WebDAV on Debian unstable cannot handle renames on WebDAV from
> file.ext to newfile (without ext) when newfile* already
> exists. Normally, git creates a file like 'objects/xx/sha1.token',
> which is renamed to 'objects/xx/sha1' when transferred completely.
>
> Just use '_' instead of '.' so WebDAV doesn't see it as an extension
> change.
>
> Signed-off-by: Rutger Nijlunsing <git@xxxxxxxxxxxxx>
> Acked-by: Johannes Schindelin <Johannes.Schindelin@xxxxxx>

Good problem and workaround description.  Nick, does this look
sane to you, or is there a more kosher way to handle this?

> ---
>  http-push.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/http-push.c b/http-push.c
> index 4021e7d..d45733e 100644
> --- a/http-push.c
> +++ b/http-push.c
> @@ -530,7 +530,7 @@ static void start_put(struct transfer_re
>  	request->dest = xmalloc(strlen(request->url) + 14);
>  	sprintf(request->dest, "Destination: %s", request->url);
>  	posn += 38;
> -	*(posn++) = '.';
> +	*(posn++) = '_';
>  	strcpy(posn, request->lock->token);
>  
>  	slot = get_active_slot();
> -- 
> 1.4.2.rc2.g7cb1
>
>
> -- 
> Rutger Nijlunsing ---------------------------------- eludias ed dse.nl
> never attribute to a conspiracy which can be explained by incompetence
> ----------------------------------------------------------------------

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]