git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] http-push: Make WebDAV work with (broken?) default apache2 WebDAV module
@ 2006-08-09 18:54 Rutger Nijlunsing
  2006-08-09 19:33 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Rutger Nijlunsing @ 2006-08-09 18:54 UTC (permalink / raw)
  To: git

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@tux.tmfweb.nl>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 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
----------------------------------------------------------------------

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] http-push: Make WebDAV work with (broken?) default apache2 WebDAV module
  2006-08-09 18:54 [PATCH] http-push: Make WebDAV work with (broken?) default apache2 WebDAV module Rutger Nijlunsing
@ 2006-08-09 19:33 ` Junio C Hamano
  2006-08-11  4:58   ` Nick Hengeveld
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2006-08-09 19:33 UTC (permalink / raw)
  To: git; +Cc: git, Johannes Schindelin, Nick Hengeveld

Rutger Nijlunsing <rutger@nospam.com> 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@tux.tmfweb.nl>
> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>

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
> ----------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] http-push: Make WebDAV work with (broken?) default apache2 WebDAV module
  2006-08-09 19:33 ` Junio C Hamano
@ 2006-08-11  4:58   ` Nick Hengeveld
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Hengeveld @ 2006-08-11  4:58 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, git, Johannes Schindelin

On Wed, Aug 09, 2006 at 12:33:42PM -0700, Junio C Hamano wrote:

> > 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@tux.tmfweb.nl>
> > Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
> 
> Good problem and workaround description.  Nick, does this look
> sane to you, or is there a more kosher way to handle this?

This looks good to me - while it seems like the problem is in the DAV
server it also seems like problematic DAV servers will be less likely to
trip up on an underscore in the filename.

-- 
For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.

This 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-08-11  4:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-09 18:54 [PATCH] http-push: Make WebDAV work with (broken?) default apache2 WebDAV module Rutger Nijlunsing
2006-08-09 19:33 ` Junio C Hamano
2006-08-11  4:58   ` Nick Hengeveld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).