Re: Git-aware HTTP transport

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

 



"H. Peter Anvin" <hpa@xxxxxxxxx> wrote:
>> Detecting Smart Servers
>> -----------------------
>>
>> HTTP clients can detect a smart Git-aware server by HEADing
>> $repo/backend.git-http and looking for a 302 redirect to the
>> repository's smart service URL:
...
>> All subsequent communcation for this transaction is done through
>> the smart service URL ($ssurl), not the original URL.
>
> I actually suggest embedding the forwarding URL into an ordinary  
> payload.  Instead of a HEAD request here, then do a GET (or, even  
> better, POST) and get the redirected URL in return.
>
> Why?  Because it's common enough to redirect entire trees, and use of  
> HTTP-layer redirections here is an unnecessary layering violation.

Hmm.  I'm actually thinking the exact opposite here.  My rationale
for putting the response as a standard HTTP 302/303 style redirect
is to permit hardware load balancers or Apache mod_rewrite rules
to implement simple load balancing with a HTTP redirect.

If we embed the redirect URL into the payload then configuring that
will become a lot more complex.  At the minimum you may have to
make up a dummy file for each server (holding the response payload)
then then let mod_rewrite rewrite the request internally to make
Apache serve that file.  Ugly.

> If you insist on using a HTTP status code, I would claim that 303 is a  
> better status code.

Ok.

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