git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Add ERR support to smart HTTP

From
Sitaram Chamarty <sitaramc@gmail.com>
Date
Sep 6, 2010, 17:59 UTC
Message-ID
<AANLkTikmU9_Vg2+=73yjPyaaDSqk73Bvs1HyNjFDWqNY@mail.gmail.com>
In-Reply-To
<20100906145606.GM32601@spearce.org>
On Mon, Sep 6, 2010 at 8:26 PM, Shawn O. Pearce <spearce@spearce.org> wrote:
Show 7 quoted lines
> That is, the following will trigger a correct error on the client:
>
>  200 OK
>  Content-Type: application/x-git-upload-pack-advertisement
>
>  001e# service=git-upload-pack
>  0022ERR You shall not do this
are those counts accurate for the specific example you show or just made up?

It seems the first line has a count in hex that includes the newline at the end, and the second one has a count in decimal that does not include the newline nor even the 4-digits plus "ERR"

> Likewise if you wanted to do this with receive-pack, replace upload
> with receive above and adjust the pkt-line lengths.

ok... what about all the other service commands? like /info/refs? What should I put there?

Sorry if I'm being stupid but I couldn't find this info anywhere (my C grokking isn't as good as it used to be anyway). I've tried all sorts of combinations of sending out two such lines -- variations on length, \r, \n, \r\n, neither, etc etc but I can't get the correct output.

Also, experimenting with making the update hook die similarly and wireshark-ing the responde does not show similar pattern coming through.

If you could point me to some place that says the precise format, including \r\n, I'd greatly appreciate it.

Thanks,
Sitaram
Previous: Shawn O. PearceNext: Shawn O. Pearce
Message 13 of 18 in “Add ERR support to smart HTTP”
  1. Add ERR support to smart HTTPIlari Liusvaara, Sep 5, 2010
  2. Jonathan NiederSep 5, 2010
  3. Ilari LiusvaaraSep 5, 2010
  4. Ævar Arnfjörð BjarmasonSep 5, 2010
  5. Ilari LiusvaaraSep 5, 2010
  6. Jakub NarebskiSep 5, 2010
  7. Sitaram ChamartySep 6, 2010
  8. Sitaram ChamartySep 6, 2010
  9. Ævar Arnfjörð BjarmasonSep 6, 2010
  10. Jakub NarebskiSep 6, 2010
  11. Joshua JuranSep 6, 2010
  12. Shawn O. PearceSep 6, 2010
  13. Sitaram ChamartySep 6, 2010
  14. Shawn O. PearceSep 6, 2010
  15. Sitaram ChamartySep 8, 2010
  16. Sitaram ChamartySep 6, 2010
  17. Jakub NarebskiSep 6, 2010
  18. Jonathan NiederSep 5, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.