4 ms·
Yes and no. Debugging a binary protocol is a bit more difficult then a text one; which is the reason HTTP is ascii based.
by daitangio 5y ago
Yes and no.
Debugging a binary protocol is a bit more difficult then a text one; which is the reason HTTP is ascii based.
- zaarn 5y agoThe reason HTTP is ASCII based isn't because it's easier to debug. It's because back then the other end was as likely to be a human as a piece of software. Because HTTP in it's early days barely had headers or even formatting, so people typed "GET /" at the server directly or used the same method to send mail directly. Nobody does that anymore and debugging is easily solved by converting your binary protocol to a textual form.
- throw0101a 5y agoI question the ascertain that humans were doing "GET /" or "HELO my.fq.dn" on any regular basis. There were mail clients from the very beginning for example: * https://en.wikipedia.org/wiki/History_of_email https://en.wikipedia.org/wiki/History_of_email Perusing document-based information was also done via clients, first with Gopher and then with the WWW: either GUIs like Mosaic, or on the CLI via (e.g.) Lynx.
- zaarn 5y agoI would question if this weren't the case often enough that people would demand it be compatible with their teleprompter.
- michaelmior 5y agoI definitely did back in the day :) But I'm only one single human.
- lmilcin 5y agoI did both send mails over SMTP as well as downloading files from FTP using Telnet.
- jbverschoor 5y agosame
- choeger 5y agoI don't think this is about human readability (albeit it might be to some extent during the design phase). Instead, I think this was the sensible thing to do when byte order was way more variable across a network. If you only send single bytes to begin with, you can as well use a textual format, IMO.
- Iwan-Zotow 5y ago> which is the reason HTTP is ascii based. well, other side of HTTP was telnet in the terminal - this is why it is ASCII to begin with
- tdeck 5y agoThis is not true. HTTP was developed for the first (graphical) web browser, WorldWideWeb. It was specifically intended to serve HTML and images, neither of which is particularly well suited for browsing with telnet.
- eloop 5y agoNot sure that is strictly correct. I vaguely remember a command line browser early in the piece. The inline image ability and <img> tag came a bit later in the story when Andreessen put it into the NCSA's Mosaic browser. I've always wondered if it was that single thing that really made the web take off, more so than hyperlinking which had been around for quite a while. People like pretty pictures, especially advertisers.
- tdeck 5y agoYou're describing the line mode browser: https://en.wikipedia.org/wiki/Line_Mode_Browser https://en.wikipedia.org/wiki/Line_Mode_Browser But that didn't just spit out the HTTP response - it parsed and rendered the HTML.
- squarefoot 5y agoIt depends from the nature of the payload. If I have to send text, I'll use a text based protocol because I can debug it more easily, but if I have to send binary information, I'd rather send it using well defined structures after taking into account word sizes, alignment, endianess etc. on the involved hardware. Back in the day I had to do that with small agents on different achitectures (IBM Power and x86) with different languages (C and Object Pascal), and the correct textbook way to do that was to use xml, but that way everything had to be converted to text, interpreted and then translated back for replies. No way, hardware was slow and we aimed at speed, so we used plain C/Pascal structures and no other manipulation except for adjusting type sizes and endianess if the hardware or language required so to make all modules compatible no matter what they were written in and where they would run. I also built my own tools for testing and debugging which were nothing more than agents that sent predefined packets and echoed at screen the return values, so that any error in the data would be quickly spotted, while a xml translation of a corrupt buffer could have missed any error not comprised in the marked text, hence hiding there was a problem somewhere. A solution like that is highly debatable for sure, but I'm among the ones who want their software to crash loudly at the first problem, not try hiding it until it creates a bigger damage.