Re: [PATCH] http-push: support full URI in handle_remote_ls_ctx()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 18, 2009, 21:28 UTC
- Message-ID
- <7v63kcuwwr.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <1232278116-6631-1-git-send-email-catap@catap.ru>
"Kirill A. Korinskiy" <catap@catap.ru> writes:
Show 13 quoted lines
> @@ -1424,9 +1425,18 @@ static void handle_remote_ls_ctx(struct xml_ctx *ctx, int tag_closed)
> ls->userFunc(ls);
> }
> } else if (!strcmp(ctx->name, DAV_PROPFIND_NAME) && ctx->cdata) {
> - ls->dentry_name = xmalloc(strlen(ctx->cdata) -
> + char *path = ctx->cdata;
> + if (!strcmp(ctx->cdata, "http://")) {
> + path = strchr(path + sizeof("http://") - 1, '/');
> + } else if (!strcmp(ctx->cdata, "https://")) {
> + path = strchr(path + sizeof("https://") - 1, '/');
> + }
> +
> + path += remote->path_len;I see you chose to address the issue I pointed out in:
http://thread.gmane.org/gmane.comp.version-control.git/103804/focus=104363
by being more strict. That's the only change I can spot compared to e1f33ef (http-push: support full URI in handle_remote_ls_ctx(), 2008-12-23) that is already in maint.
Could you make this into an incremental patch?