Re: Git-aware HTTP transport
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Aug 28, 2008, 17:43 UTC
- Message-ID
- <20080828174334.GF21072@spearce.org>
- In-Reply-To
- <alpine.DEB.1.10.0808281033070.2713@asgard.lang.hm>
david@lang.hm wrote:
Show 11 quoted lines
> On Thu, 28 Aug 2008, Shawn O. Pearce wrote: >> david@lang.hm wrote: >>> On Thu, 28 Aug 2008, Shawn O. Pearce wrote: >>>>> "Shawn O. Pearce" <spearce@spearce.org> writes: >>>> >>>> Yes, I really did mean for this part of the protocol to be in binary. >>> >>> except that HTTP cannot transport binary data, if you feed it binary data >>> it then encodes it into 7-bit safe forms for transport. >> >> So then how does it transport a GIF file to my browser? uuencoded?
...
> I could be wrong, but I'm pretty sure I'm not. to test this yourself find > a webserver with an image file and retrieve it via telnet (telnet > hostname 80<enter>GET /path/to/file HTTP/1.0<enter><enter>) and what will > come back will be text.
$ telnet www.google.com 80 Trying 74.125.19.104... Connected to www.google.com (74.125.19.104). Escape character is '^]'. GET /intl/en_ALL/images/logo.gif HTTP/1.0 HTTP/1.0 200 OK Content-Type: image/gif Last-Modified: Wed, 07 Jun 2006 19:38:24 GMT Expires: Sun, 17 Jan 2038 19:14:07 GMT Cache-Control: public Date: Thu, 28 Aug 2008 17:40:44 GMT Server: gws Content-Length: 8558 X-Google-Backends: /bns/pq/borg/pq/bns/gws-prod/staticweb.staticfrontend.gws/16:9836,dauf30:80 X-Google-Service: static X-Google-GFE-Request-Trace: dauf30:80,/bns/pq/borg/pq/bns/gws-prod/staticweb.staticfrontend.gws/16:9836,dauf30:80 Connection: Close GIF89a n���������������έ ���E�I�4�<���������ƾ����M������������セ�����$c!Y�����QΜ�������e֮c��1e�J}<�������s�����9q�k
Very funny. It trashed my tty. Even reset won't restore the settings. Anyway.
I chose the Google logo on the Google homepage because I know we try really hard to conform to standards, so we can have the biggest possible user base. Micro$oft or Yahoo! probably would have come out the same way. Or some image on kernel.org.
Anyway, I didn't send any browser data, so the server had to assume the dumbest f'ing browser on the planet, and I got back binary data.
-- Shawn.