TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The HTTP crash course nobody asked for

902 点作者 g0xA52A2A超过 2 年前

25 条评论

Joker_vD超过 2 年前
&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 未加载
Donckele超过 2 年前
“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 未加载
leinadho超过 2 年前
The humorous style is very refreshing, if only my networking lecturers had been more witty I might remember more of this
X-Istence超过 2 年前
&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 未加载
yfiapo超过 2 年前
&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_me超过 2 年前
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 未加载
Andys超过 2 年前
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 未加载
Icathian超过 2 年前
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 未加载
juped超过 2 年前
If you&#x27;re using OpenBSD nc already, just use nc -c for TLS.
评论 #33285494 未加载
photochemsyn超过 2 年前
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>
rpigab超过 2 年前
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!
est超过 2 年前
I hope there&#x27;s a h2 or TLS crash course.
评论 #33286060 未加载
antonvs超过 2 年前
&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 未加载
sireat超过 2 年前
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 未加载
mannyv超过 2 年前
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 未加载
mahdi7d1超过 2 年前
I didn&#x27;t ask but I needed it.
mannyv超过 2 年前
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.
mannyv超过 2 年前
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_im超过 2 年前
Yay! this is going to be a great read for the weekend!
danesparza超过 2 年前
More articles should be written in the style of this article. Thank you for this.
评论 #33370036 未加载
tinglymintyfrsh超过 2 年前
<p><pre><code> GET &#x2F; HTTP&#x2F;1.0\r\n\r\n </code></pre> Still works with many websites.
mlindner超过 2 年前
Is there a way to get this guide without the annoying side-commentary?
评论 #33294175 未加载
tomcam超过 2 年前
Funny and very helpful. Thank you.
cph123超过 2 年前
For a crash course would the code examples have been better in something like Python rather than Rust?
评论 #33287294 未加载
评论 #33287289 未加载
tmountain超过 2 年前
This is gold.