Re: git-receive-pack --stateless-rpc

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

 



On Thu, Jun 17, 2010 at 6:45 AM, Yiyi Sun <yiyisun@xxxxxxxxx> wrote:
> I am creating a Git smart HTTP protocol wrapper and run into two
> problem. I tried the msysGit mailing list and was told to ask them to
> the main git mailing list.
>
> Here is the story. During 'git push',  I successfully processed the
> initial GET request of '/info/refs?service=git-receive-pack' by
> sending back the output of 'git receive-pack --stateless-rpc
> --advertise-refs'. Then msysGit did a the POST request. I
> invoked 'git receive-pack --stateless-rpc', which returned:
>
> 0030 000eunpack ok
> 0019ok refs/heads/master
> 00000000

That doesn't look right to me.  There appears to be a space at the
start of the packet (between 0030 and 000e), which would confuse the
protocol.  Otherwise, that appears to be a valid response from
receive-pack assuming the client asked for side-band-64k in the
request, and it pushed only refs/heads/master.

> Question #1, Is the result supposed to be something below instead?
>
> 000eunpack ok
> 0019ok refs/heads/master
> 0000

Depends on whether or not the client asked for side-band-64k.  If it
did, we wrap it up in a another pkt-line framing like above, and end
with another flush-pkt.  If the client didn't ask for side-band-64k,
then the above would be the correct response.

> Question #2, msysGit cannot parse the result, it displays error message:
>
> fatal: protocol error: bad line length character:
> 003
> fatal: The remote end hung up unexpectedly

This is weird.  "003" isn't valid, its not 4 bytes long.  What was
that trailing final 4th byte right there?  If its a space like it is
above (though then its really in the wrong spot, isn't it?) that would
throw it all off.

It sounds to me like your wrapper is mangling the data that is passing
through it on the way back to the client.

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