Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

Re: [PATCH] http-push: support full URI in handle_remote_ls_ctx()

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:59

"Kirill A. Korinskiy" [off-list ref] writes:
quoted hunk ↗ jump to hunk
@@ -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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help