More on git over HTTP POST

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

 



Hi all,

I have investigated a bit what it would take to support git protocol (smart transport) over HTTP POST transactions.

The current proxy system is broken, for a very simple reason: it doesn't convey information about when the channel should be turned around.

HTTP POST -- or, for that matter, any RPC-style transport, is a half duplex transport: only one direction can be active at a time, after which the channel has to be explicitly turned around. The "turning around" consists of posting the queued transaction and listening for the reply.

Ultimately, it comes down to the following: the transactor needs to be given explicit information when the git protocol goes from writing to reading (the opposite direction information is obvious.) I was hoping that it would be possible to get this information from snooping the protocol, but it doesn't seem to be so lucky.

I started to hack on a variant which would embed a VFS-style interface in git itself, looking something like:

struct transactor;

struct transact_ops {
	ssize_t (*read)(struct transactor *, void *, size_t);
	ssize_t (*write)(struct transactor *, const void *, size_t);
	int (*close)(struct transactor *);
};

struct transactor {
	union {
		void *p;
		intptr_t i;
	} u;
	const struct transact_ops *ops;
};

Replacing the usual fd operations with this interface would allow a different transactor to see the phase changes explicitly; the replacement to use xread() and xwrite() is obvious.

Of course, I started hacking on it and found myself with zero time to continue, but I thought I'd post what I had come up with.

	-hpa
--
To unsubscribe from this list: 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]

  Powered by Linux