TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The HTTP crash course nobody asked for

902 pointsby g0xA52A2Aover 2 years ago

25 comments

Joker_vDover 2 years ago
&gt; HTTP&#x2F;1.1 is a delightfully simple protocol, if you ignore most of it.<p>As someone who had to write a couple of proxy servers, I can&#x27;t express how so sadly accurate it is.
评论 #33286705 未加载
评论 #33287766 未加载
评论 #33287038 未加载
评论 #33295248 未加载
Donckeleover 2 years ago
“By contrast, I think about Bluetooth a lot. I wish I didn&#x27;t.”<p>LOL, yes same here. Can’t wait for Bluetooths b̶a̶l̶l̶s̶ baggage to be chopped.
评论 #33286068 未加载
leinadhoover 2 years ago
The humorous style is very refreshing, if only my networking lecturers had been more witty I might remember more of this
X-Istenceover 2 years ago
&gt; This is not the same as HTTP pipelining, which I will not discuss, out of spite.<p>That is cause HTTP pipelining was and is a mistake and is responsible for a ton of http request smuggling vulnerabilities because the http 1.1 protocol has no framing.<p>No browser supports it anymore, thankfully.
评论 #33288601 未加载
yfiapoover 2 years ago
&gt; We&#x27;re not done with our request payload yet! We sent:<p>&gt; Host: neverssl.com<p>&gt; This is actually a requirement for HTTP&#x2F;1.1, and was one of its big selling points compared to, uh...<p>&gt; AhAH! Drew yourself into a corner didn&#x27;t you.<p>&gt; ...Gopher? I guess?<p>I feel like the author must know this.. HTTP&#x2F;1.0 supported but didn&#x27;t require the Host header and thus HTTP&#x2F;1.1 allowed consistent name-based virtual hosting on web servers.<p>I did appreciate the simple natures of the early protocols, although it is hard to argue against the many improvements in newer protocols. It was so easy to use nc to test SMTP and HTTP in particular.<p>I did enjoy the article&#x27;s notes on the protocols however the huge sections of code snippets lost my attention midway.
评论 #33287609 未加载
I_complete_meover 2 years ago
That was an excellent, well-written, well-thought out, well presented, interesting, humorous, enjoyable read. Coincidentally I recently did a Rust crash course so it all made perfect sense - I am not an IT pro. Anyhows, thanks.
评论 #33286288 未加载
评论 #33286674 未加载
评论 #33288343 未加载
评论 #33286151 未加载
评论 #33291835 未加载
Andysover 2 years ago
I learned HTTP1 pretty well but not much of 2.<p>Since playing with QUIC, I&#x27;ve lost all interest in learning HTTP&#x2F;2, it feels like something already outdated that we&#x27;re collectively going to skip over soon.
评论 #33286442 未加载
评论 #33286543 未加载
评论 #33286245 未加载
评论 #33286184 未加载
Icathianover 2 years ago
Amos&#x27; writing style is just so incredibly good. I don&#x27;t know anyone else doing these very long-form, conversational style articles.<p>Plus, you know, just an awesome dev who knows his stuff. Huge fan.
评论 #33292845 未加载
jupedover 2 years ago
If you&#x27;re using OpenBSD nc already, just use nc -c for TLS.
评论 #33285494 未加载
photochemsynover 2 years ago
What a great overall site. Hopping down the links I found the section on files with code examples in JS, Rust and C, plus strace, really the best short explanation I&#x27;ve ever found online.<p><a href="https:&#x2F;&#x2F;fasterthanli.me&#x2F;series&#x2F;reading-files-the-hard-way&#x2F;part-1" rel="nofollow">https:&#x2F;&#x2F;fasterthanli.me&#x2F;series&#x2F;reading-files-the-hard-way&#x2F;pa...</a>
rpigabover 2 years ago
This is awesome, didn&#x27;t read all of it yet, but I will for sure, I use HTTP way too much and too often to ignore some of these underlying concepts, and when I try to look it up, there&#x27;s always way too much abstraction and the claims aren&#x27;t proven to me with a simple example, and this article is full of simple examples. Thanks Amos!
estover 2 years ago
I hope there&#x27;s a h2 or TLS crash course.
评论 #33286060 未加载
antonvsover 2 years ago
&gt; Where every line ends with \r\n, also known as CRLF, for Carriage Return + Line Feed, that&#x27;s right, HTTP is based on teletypes, which are just remote typewriters<p>Does it need to be pointed out that this is complete bullshit?
评论 #33294424 未加载
评论 #33319647 未加载
评论 #33294074 未加载
评论 #33293074 未加载
sireatover 2 years ago
Is HTTP always the same protocol as HTTPS - given the same version - and ignoring the encryption from TLS?<p>Theoretically yes, but in practice?<p>I&#x27;ve done my share of nc testing even simpler protocols than HTTP&#x2F;1.1<p>For some reason the migration to HTTPS scared me despite the security assurances. I could not see anything useful in wireshark anymore. I now had to trust one more layer of abstraction.
评论 #33286656 未加载
评论 #33286619 未加载
评论 #33304792 未加载
mannyvover 2 years ago
As far as i can tell the host header is pointless, because if it&#x27;s ssl&#x2F;tls you won&#x27;t be able to read it and route it. That&#x27;s what sni is for. If you aren&#x27;t tls then you don&#x27;t need it, unless you hit the server as an ip. But then why would you do that?
评论 #33304578 未加载
评论 #33304633 未加载
mahdi7d1over 2 years ago
I didn&#x27;t ask but I needed it.
mannyvover 2 years ago
Also, never trust the content length. It&#x27;s been that way since before http was finalized. Use it as guidance, but don&#x27;t treat it as canonical.
mannyvover 2 years ago
When doing http by hand, it&#x27;s better to do http&#x2F;1.0 because that tells the server you (and it) can&#x27;t do anything exciting.
mustak_imover 2 years ago
Yay! this is going to be a great read for the weekend!
danesparzaover 2 years ago
More articles should be written in the style of this article. Thank you for this.
评论 #33370036 未加载
tinglymintyfrshover 2 years ago
<p><pre><code> GET &#x2F; HTTP&#x2F;1.0\r\n\r\n </code></pre> Still works with many websites.
mlindnerover 2 years ago
Is there a way to get this guide without the annoying side-commentary?
评论 #33294175 未加载
tomcamover 2 years ago
Funny and very helpful. Thank you.
cph123over 2 years ago
For a crash course would the code examples have been better in something like Python rather than Rust?
评论 #33287294 未加载
评论 #33287289 未加载
tmountainover 2 years ago
This is gold.