Coding a Web Server in 25 Lines - Computerphile

  Переглядів 313,434

Computerphile

Computerphile

2 місяці тому

Just how simple can a web server be? Laurence Tratt, Shopify / Royal Academy of Engineering Research Chair in Language Engineering at Kings College London builds it up.
More about Laurie: bit.ly/C_LaurenceTratt
/ computerphile
/ computer_phile
This video was filmed and edited by Sean Riley.
Computer Science at the University of Nottingham: bit.ly/nottscomputer
Computerphile is a sister project to Brady Haran's Numberphile. More at www.bradyharanblog.com
Thank you to Jane Street for their support of this channel. Learn more: www.janestreet.com

КОМЕНТАРІ: 657
@AndreDeLimburger
@AndreDeLimburger 2 місяці тому
The joy of modern programming languages. Listening on a socket in just one line.
@sumantagogoi
@sumantagogoi 2 місяці тому
yep.. that itself was the main trick... that one line.. tcp listen..
@aawwmm
@aawwmm 2 місяці тому
java had that in 1995... ServerSocket for those asking After looking into c it has Socket.h so even in c its there...
@dexio85
@dexio85 2 місяці тому
It's not a programming language, it's the set of libraries it comes with. I think you are confusing two things here.
@AndreDeLimburger
@AndreDeLimburger 2 місяці тому
The standard libraries that come with the language, are they considered part of the language?
@rogo7330
@rogo7330 2 місяці тому
It's two syscalls to Linux kernel too. Not so heavy to implement that in any language that allows to do syscalls.
@samwalker4438
@samwalker4438 2 місяці тому
I loved Laurie’s smile each time he wrote something he knew was absolutely dodgy!
@AdamSpurgin
@AdamSpurgin 2 місяці тому
I write webservices for a living and I have that same energy when realizing I can cheat the system and completely ignore convention.
@uuu12343
@uuu12343 2 місяці тому
He is a gift that keeps on giving A fundamental explanation of making a simple webserver in 25 LOC for easy understanding of its components A lecturer that 1. Uses Rust 2. Uses a framework laptop 3. USES NEOVIM very nice
@fractalphilosophorum9405
@fractalphilosophorum9405 2 місяці тому
And runs on OpenBSD !
@moose-1
@moose-1 2 місяці тому
And uses Firefox
@slendi9623
@slendi9623 2 місяці тому
True
@bhavyakukkar
@bhavyakukkar 2 місяці тому
And uses gruvbox
@PotatoCider
@PotatoCider 2 місяці тому
he's too based
@vincei4252
@vincei4252 2 місяці тому
You can build the web server in one line of code if you put your 25 lines of code in a library. 😂
@ai-spacedestructor
@ai-spacedestructor 2 місяці тому
or write all of the code in one line, even if we dont strip down the server to the bare minimum, a full server is still just 1 line of code if you format it in such a way that its all on the same line.
@vincei4252
@vincei4252 2 місяці тому
@@ai-spacedestructor isn't every application just one line of code/one function? main() {... } It's turtles all the way down.
@mail2ajm
@mail2ajm 2 місяці тому
Low level programmer:
@ai-spacedestructor
@ai-spacedestructor 2 місяці тому
@@vincei4252 depends on the programming language, im not too familiar with rust to know how that is exactly.
@zfold4702
@zfold4702 2 місяці тому
Nodejs😂
@wildwestrom
@wildwestrom 2 місяці тому
Programming Rust on a Framework laptop running OpenBSD. Absolutely based.
@gg-gn3re
@gg-gn3re 2 місяці тому
neovim and looks like alacritty as well
@udasai
@udasai Місяць тому
I fully expected Python, the Visual Basic of the modern age. It's the only reason I clicked the link, to see if I was right, since for any modern environment you can write a "web server" with three statements: import web library, set default response string, invoke the listener.
@jumbledfox2098
@jumbledfox2098 Місяць тому
incredibly based.
@hachikuku5226
@hachikuku5226 Місяць тому
you all sound like reddit and hn nerds absolutely cooming over a dude's setup.
@gg-gn3re
@gg-gn3re Місяць тому
@@hachikuku5226That's the point, poindexter.
@OldShatterham
@OldShatterham 2 місяці тому
Honestly I didn't expect the fundamentals of HTTP to be so easy. This sort of "from-the-ground-up" approach was really fun to watch!
@GottZ
@GottZ 2 місяці тому
email is of similar complexity.
@Faladrin
@Faladrin 2 місяці тому
Sure, when you have libraries in place that do all the actual on the ground stuff we don't see in the video.
@collinswisher6566
@collinswisher6566 2 місяці тому
@@Faladrinreally the only library he used was the tcplistener implementing the protocol was all up to him.
@beentheredonethatunfortunately
@beentheredonethatunfortunately 25 днів тому
There's a degree of knowing I.T. being seen as knowing how to use Word and Excel. Been this way for a couple of decades at least. Very few people seem to know the basics.
@vercolit
@vercolit 2 місяці тому
I had this professor for a few lectures in my undergrad during covid. He was very enthusiastic, funny and explained things really well. He was also was explaining concepts with his neovim + rust setup. Happy to see him again on computerphile!
@dylanmeeks54
@dylanmeeks54 2 місяці тому
Rust user? Framework laptop owner? Based prof.
@KarunaMurti
@KarunaMurti 2 місяці тому
Bet prof use Arch too btw.
@Lb8068
@Lb8068 2 місяці тому
Based on what?
@beatboy6690
@beatboy6690 2 місяці тому
Rust user, framework laptop and vim user. Mega based
@toby2581
@toby2581 2 місяці тому
Wonder when he's getting his bottom surgery.
@UnevenMike
@UnevenMike 2 місяці тому
And neovim and firefox
@NetherFX
@NetherFX 2 місяці тому
The funny thing is, there's an async tutorial in the Rust Book that explains how to use threads with a web server do handle 4 workers. If I remember correctly it's not even 10 lines more. Would've been a cool addition!
@Gnarkson
@Gnarkson 2 місяці тому
which rust book?
@NetherFX
@NetherFX 2 місяці тому
@@Gnarksonshould be chapter 20 in "the book" (referring to the official book)
@Gnarkson
@Gnarkson 2 місяці тому
@@NetherFX thanks
@halfsourlizard9319
@halfsourlizard9319 2 місяці тому
'I am abusing this monstrously.' == always the sign of well-written code.
@TAP7a
@TAP7a 2 місяці тому
“What I’m doing is a crime against silicon” = writing some of the most ingenious code possible to write
@phill6859
@phill6859 2 місяці тому
No, not even close
@phill6859
@phill6859 2 місяці тому
​@@TAP7aif you think it's ingenuous then it's more about what you think than the code itself.
@kevinmcdonough9097
@kevinmcdonough9097 2 місяці тому
Genius or, more likely, brittle code only workable by the original author. Could be either. Could be both.
@halfsourlizard9319
@halfsourlizard9319 2 місяці тому
@@kevinmcdonough9097 Oh, very probably both 😜
@nullptr.
@nullptr. 2 місяці тому
You can tell this guy loves what he does. Thanks for the video!
@Microphunktv-jb3kj
@Microphunktv-jb3kj 2 місяці тому
highly paid serf is a happy and productive serf... : )
@TheHenrik225
@TheHenrik225 2 місяці тому
Great format for explaining web servers. Those 17 minutes flew by
@pmmeurcatpics
@pmmeurcatpics 2 місяці тому
Don't know if it's a coincidence, but the code really reminded of the one in the first chapters of the Rust Book - Building a Multithreaded Web Server. I've just been reading it a couple of weeks ago, and can definitely recommend taking a look if you're interested! Though it's worth mentioning that the code does contain some difficult Rust
@vincei4252
@vincei4252 2 місяці тому
Difficult Rust can't be as bad as "modern" C++ with templates and meta-programming? Can it?
@pmmeurcatpics
@pmmeurcatpics 2 місяці тому
@@vincei4252 unfortunately I can't make this comparison since I barely know C++, let alone "modern" C++. Rust does meta-programming using things called macros - from what I've heard, they're quite powerful and reasonably easy to understand? Though they're definitely WIP, so there're a couple of rough edges here and there. There was a talk recently, called something like "Anything you can do, I can do it worse with macro_rules!", where the host showed a somewhat extreme example - a macro they created that can automatically create a fully functional XML representation of a token tree of Rust code
@framegrace1
@framegrace1 2 місяці тому
This code will be very similar on any language, really. Even the ones with no sugar added.
@TAP7a
@TAP7a 2 місяці тому
@@vincei4252they’re as bad as each other syntactically, Rust is probably a little more coherent, but the precision demanded by the Rust compiler is simultaneously much more reassuring and frustrating. Whereas modern C++ is less coherent, but quicker to get running, but only if you accept all the footguns that come with it.
@Lurco8
@Lurco8 2 місяці тому
Fantastic content, that's what I was always missing in the "basic" server setup - the way the server actually functions!
@Sonex1542
@Sonex1542 2 місяці тому
This was awesome. I was a programmer, now a DBA. Having someone explain code like this is what a learning experience should be.
@Meow_YT
@Meow_YT 2 місяці тому
"In 25 lines" is doing a lot of heavy lifting with those libraries wrapping so much networking code.
@CramBL
@CramBL 2 місяці тому
"Those libraries" he's using one library and it's the relatively tiny Rust standard library. Try writing to stdout in less than 25 lines without calling 50 lines of C or another binary that does just that.
@zerker2000
@zerker2000 2 місяці тому
​@@CramBLNot wrong in spirit, but "call the SYS_WRITE syscall" is like 5 lines of assembly, or a hardware serial port equivalent in low-level systems
@Meow_YT
@Meow_YT 2 місяці тому
​@@CramBLOh stop. It's just a bait title. So much is going on behind the scenes. People slowly forgetting how much work has been done by others in the past, and it boils down to "in 25 lines". It's a bit tiring. And it's all going to be forgotten if anything major happens and people don't know how to fix the problems. Cos all we'll have are the imports and no one knows the magic inside. Just 1 billion lazy devs that know the 25 lines.
@gg-gn3re
@gg-gn3re 2 місяці тому
@@CramBL yea and try doing it without a kernel, that's even more lines!
@habl844
@habl844 2 місяці тому
Libraries like... the kernel??? That's where the whole IP stack and sockets are implemented. Even in assembly this code wouldn't be massively longer.
@lanatrzczka
@lanatrzczka 2 місяці тому
Even before the rest was completed, just the bit that sent back "Hello Computerphile" was totally amazing to me.
@VivekYadav-ds8oz
@VivekYadav-ds8oz 2 місяці тому
Glad to see Rust having reached a point where it's no longer "Building a web server in Rust" but just building a web server, oh and btw we chose this whatever language because it's mainstream enough and understandable enough to not take away from the main point of the lesson.
@joaopedrorocha4790
@joaopedrorocha4790 2 місяці тому
I love this guy's computherphile videos! He's always very clear and bring practical stuff.
@sneaksneak6522
@sneaksneak6522 2 місяці тому
Awesome video, great job at explaining the questions asked. Absolute chad energy Laurence Please do more videos like this!
@Norman_Fleming
@Norman_Fleming 2 місяці тому
it is important to remember that whichever end you are writing, you need to consider the other end a bad actor or buggy AF.
@Ebiko
@Ebiko 2 місяці тому
That's what he's saying. He's ignoring any safety concerns for this example like error handling or exploit fixing
@YandiBanyu
@YandiBanyu 2 місяці тому
I always recommend everyone trying to one up their programming skill is to create web server using the HTTP spec. It really teaches a lot about what programming is. There is a document that you have to follow and the expected behaviour, how you handle edge cases, how you optimize some algorithm, etc. Why HTTP and not anything else is jusy because the sheer number of implementation available that you can use as a reference.
@laptoprelaks
@laptoprelaks 2 місяці тому
interesting will try soon😂
@linuxguy1199
@linuxguy1199 2 місяці тому
Nice! One of my first projects was writing my own webserver in Java, later added PHP support and used it to host my website.
@andiuptown1711
@andiuptown1711 Місяць тому
How did making a Java web server go? Any tips?
@pedroth3
@pedroth3 2 місяці тому
Like all computerphile video of Dr Laurence Tratt. Great work!
@smccrode
@smccrode 2 місяці тому
Great video! If you want to remove the duplicate INSERT mode you can add: set noshowmode into your config.
@nelioasousa
@nelioasousa Місяць тому
Absolutely amazing! Thank you very much, Mr. Tratt.
@comosaycomosah
@comosaycomosah 2 місяці тому
this channel is fire tbh
@Simon-ir6mq
@Simon-ir6mq 2 місяці тому
This was really nice! I'm so used to getting everything low-level served to you as a library call when you actually need so little of the library you could just do the thing yourself.
@TallMoose
@TallMoose 2 місяці тому
Great video! Just a few weeks ago my collegues and I were chatting about a web project I was working on, and the question of "How exactly does a web server even work?" came up. At the time we didn't look too deep into it, since we are all high level programmers who don't remember our college days. This really pointed out how simple you can really do it!
@gerokatseros
@gerokatseros 2 місяці тому
Best channel in you tube ... i am surprised by how well and simply everything is explained. I don't use rust but i already figured out how to do it in Python!
@teej_dv
@teej_dv 2 місяці тому
TELESCOPE USED!! LETS GOOOOOOO!!!!!
@mjhika
@mjhika 2 місяці тому
TELESCOPE!!!
@Pbertrand_dev
@Pbertrand_dev 2 місяці тому
wait arent you teej the creator of telescope but you also stream on twitch?
@n0kodoko143
@n0kodoko143 2 місяці тому
Telescope, Lets GOOOOOO
@RenXZen
@RenXZen 2 місяці тому
timestamp 1:51 woooooooooooo
@DamnitDutch
@DamnitDutch 2 місяці тому
🔭 NeoVim without Telescope LITERALLY unusable 🔭
@ayanSaha13291
@ayanSaha13291 Місяць тому
Learnt something nice today! Thanks for uploading, Lastly the authors enthusiasm regarding his craft was quite infectious.
@slluxxx
@slluxxx 2 місяці тому
awesome. even though i am a fullstack dev, this seemed always daunting and i never wanted to look into it but its actually super super easy. really well made!
@MegaAresik
@MegaAresik Місяць тому
Didn't expect the video to include the Rust programming language. As always valuable materials presented for pure knowledge:)
@MyCodingDiarie
@MyCodingDiarie 2 місяці тому
Wow, this is exactly what I needed. You're a lifesaver!
@user-ut2jy4fe2m
@user-ut2jy4fe2m Місяць тому
Although my English is not good, I spent an afternoon watching and learning from this video. This video is really simple and easy to understand for beginners like me.
@dehrk9024
@dehrk9024 Місяць тому
I love listening to these smart people it's so motivation and takes you into the presence, sharpening your mind..
@petersuvara
@petersuvara 2 місяці тому
Great to see someone coding in rust! Thank you. 🙏🏻
@AndrewTSq
@AndrewTSq 2 місяці тому
Loved this episode!. Thanks.
@SrFrancia0
@SrFrancia0 2 місяці тому
You didn't have to flex your vim skillz that hard lmao what a legend. Also noticed the framework laptop
@MJ-xh8co
@MJ-xh8co 2 місяці тому
I did the same project for a distributed systems course. What a great small project.
@sundhaug92
@sundhaug92 2 місяці тому
One difficulty with supporting multiple sites in a webserver is that you have to support it using both raw HTTP ... and TLS SNI (ServerName Indication) and ideally TLS ESNI (Encrypted SNI)
@DevduttShenoi
@DevduttShenoi 2 місяці тому
This guy's the kinda professor I wanted all my academic life! nvim, rust in linux on a framework laptop! Be my guide sensei 😭❤
@wbfaulk
@wbfaulk 2 місяці тому
Pretty sure he was running FreeBSD, based on the browser's "user-agent", not Linux.
@gspapp
@gspapp 2 місяці тому
OpenBSD @@wbfaulk
@smikkelbeer6352
@smikkelbeer6352 2 місяці тому
​@@wbfaulk OpenBSD, even
@wbfaulk
@wbfaulk 2 місяці тому
@@smikkelbeer6352 dammit
@daze8410
@daze8410 2 місяці тому
@ThePrimeTime needs to see this
@taylorswe
@taylorswe 2 місяці тому
the "I'm abusing this monstrously - agen"
@romevang
@romevang 2 місяці тому
I think he watched it on today’s stream, we’ll see if it gets posted.
@AliciaSykes
@AliciaSykes 2 місяці тому
Me expecting him to run `npx http-server index.html` and be done with it 😆 Great video, thanks Laurence!
@philrod1
@philrod1 Місяць тому
25 lines of code plus 4.6 gigs of node packages for some reason 😂
@marcruijs1039
@marcruijs1039 2 місяці тому
Love seeing the framework laptop!
@yugshende3
@yugshende3 2 місяці тому
I like this transition. We went from Perl one liners or insane algorithimic one liners to now people applying creativity to web servers and api designs. I was just thinking about how computer science is getting boring nowadays but I’m glad that there’s still a few breaths left until it totally becomes the next accounting-esque profession.
@sofianikiforova7790
@sofianikiforova7790 2 місяці тому
I’m not sure it will ever be an accounting-esque profession. The amount of creativity involved and flexibility of tooling, and solutions are always going to be more open ended than accounting.
@yugshende3
@yugshende3 2 місяці тому
@@sofianikiforova7790 I agree but I think the creativity part of it is tied behind the language. once people can code in their native languages I think more or less the syntactical accuracy will become a matter of just putting the right structure in place. So, more or less like accounting. Similarly how people still do creative stuff with accounting (eg new ways of building ledgers like crypto) but the basic premise has converged onto a more or less singular agreed-upon convention. Computer Science was fighting that premise at its very core I think with several languages and several programming paradigms. But with the advent of AI the programming paradigms or "code structure" might become meaningless. A computer for example doesn't care if the JS file is minified or beautified. We do.
@Vl_OLET
@Vl_OLET 2 місяці тому
no way y’all happened to upload the exact type of thing i’ve been looking for lately
@addas4
@addas4 2 місяці тому
Thank you! You gave me courage!
@SoreBrain
@SoreBrain 2 місяці тому
Great video, loved it!
@PatrickPoet
@PatrickPoet Місяць тому
"you could call it a good listener," you startled a laugh out loud out of me:) Thanks.
@chyldstudios
@chyldstudios 2 місяці тому
simple and to the point. nice!
@HarryHelsing
@HarryHelsing 2 місяці тому
Rust and Neovim, I like your style.
@PbPomper
@PbPomper 2 місяці тому
Can't get used to Rust syntax.
@rkin2009
@rkin2009 2 місяці тому
I don't know why, but I just thought about how to make a web server and this video came up. What a coincidence!
@codewizard58
@codewizard58 2 місяці тому
You can make a secure web site with about 60 lines of C that is extensible. Did this 28 years ago and was used as part of one the the first internet proxy firewalls.
@patrickle2500
@patrickle2500 2 місяці тому
You have taught more about general services (it doesn’t have to be for web) than college ever did for me
@tmnt9001
@tmnt9001 2 місяці тому
First of all, fantastic video. It's amazing how you managed to simplify such a complex topic. Second of all - as a software engineer - your corner cutting made my skin crawl. 😅
@jvoynar5826
@jvoynar5826 2 місяці тому
Thanks for the beginner friendly Rust tutorial!
@ddude27
@ddude27 2 місяці тому
Crazy to think we've abstracted all the low level aspects for creating a web server. Just going through all the standards/protocols invented to get this web server going that looks simplistic would take a lot of computer science courses to get a deep understanding of it all.
@deadlock107
@deadlock107 2 місяці тому
Recreated it in python and learned a lot. Thank You!
@wcheswick
@wcheswick 2 місяці тому
Lovely sample. I used to do all this with a shell script. Same approach, and potentially quite safe.
@bersl2
@bersl2 2 місяці тому
0:34 I am currently waist-deep in the Apache internals at work, so I can attest to this.
@taylor1038
@taylor1038 2 місяці тому
Love the Framework laptop!
@VaughnKottler
@VaughnKottler 2 місяці тому
Neovim for the win! That's some serious productivity!
@DoRullings
@DoRullings 2 місяці тому
They could do a http path traversal, e.g.: [address to server]/../../../../etc/passwd
@Turalcar
@Turalcar 2 місяці тому
I think you could just start with // to get to the root
@sofianikiforova7790
@sofianikiforova7790 2 місяці тому
He acknowledged this insecurity.
@DoRullings
@DoRullings 2 місяці тому
@@sofianikiforova7790 Yes he does. I only showed one way to access directories you don't want other people to access. It wasn't meant as a "gotcha" moment. 😉
@DoRullings
@DoRullings 2 місяці тому
​@@Turalcar I'm not sure if it would have worked on that server, tbh. In any case, I would have written the comment in the same way as it makes it easier to read/recognize, and UKposts comments are not suitable for this as anything resembling a URL is easily caught by the scam filter.
@polarfamily6222
@polarfamily6222 25 днів тому
Kudos on using a part oh The VIM family! I also really need to look more at rust 🤣👍
@metcaelfe
@metcaelfe Місяць тому
Oauth clients are an incredibly useful implementation of these
@MyCodingDiarie
@MyCodingDiarie 2 місяці тому
I wish I could give this video more than one like. It's that good!
@landspide
@landspide 2 місяці тому
Brilliant!
@damirparipovic5179
@damirparipovic5179 2 місяці тому
Uses Rust and Nvim w/ gruvbox colours? Absolutely based professor.
@danielAgorander
@danielAgorander 2 місяці тому
Using a slightly different one eh? I checked, and I spot some OpenBSD httpd! High Five Laurence Tratt! (And OpenBSD does run very nice on the Framework laptop. :D )
@EmanuelRaziel
@EmanuelRaziel 23 дні тому
Thank you a lot!
@rtdietrich
@rtdietrich Місяць тому
Very nice! thank you
@incredifall
@incredifall 2 місяці тому
Legend!!
@speakertoanimals
@speakertoanimals 2 місяці тому
Great presentation! I came for the httpd teaser, I left with my first appreciation of Rust.
@kil98q
@kil98q 2 місяці тому
Love that framework laptop you got there ;) got one too.
@GoKotlinJava
@GoKotlinJava 2 місяці тому
Very nice. Loved the video,
@RoyRope
@RoyRope 2 місяці тому
Very nice explanation.
@FabianVilersBe
@FabianVilersBe 2 місяці тому
10:50 you could use the split_whitespace() function 😊
@Lion_McLionhead
@Lion_McLionhead 2 місяці тому
Remember the good old days when writing a 1 line web server in perl was the rage.
@jslay88
@jslay88 2 місяці тому
While its nice to see this broken down for people, I also want to stress how dangerous this is without proper security and exploit handling. It is almost always better to implement some well known http server library if you need this functionality. It's not just handling files to have basic security here. There are all sorts of RCE via injection you have to be concerned with, etc, depending on which language you implement this in. However, this is a great exercise for learning this!
@abcde...7960
@abcde...7960 21 день тому
It is an interesting video thanks for sharing.
@dougclendening5896
@dougclendening5896 2 місяці тому
Realizing that someone needed to program the libraries you were using feels like a lost art. We stand on the shoulder of giants.
@shoaib_zubair
@shoaib_zubair 2 місяці тому
love your shirt pattern.
@groverphonic
@groverphonic 2 місяці тому
Good to see another openBSD enjoyer :)
@slmjkdbtl
@slmjkdbtl 2 місяці тому
It'll also be very informative to show people how to build a http server in C in 100 lines, with socket(), recv() etc. Rust already wraps things in pretty std packages, and it has syntax noise which can confuse people who aren't familiar with it (compared to the simplicity of C)
@jearl961
@jearl961 Місяць тому
Love seeing Rust on the channel! Not a big fan of his variable names though.
@shad0wman
@shad0wman Місяць тому
ive always loved how "gobblygoop" is an official industry term
@dotdotlar
@dotdotlar 2 місяці тому
What (Neo)Vim plugins did you use? That’s a great looking setup.
@coutinhotiago
@coutinhotiago Місяць тому
I love production ready code 🙂
@rursus8354
@rursus8354 2 місяці тому
I knew almost all, and I detest Rust, but I just learned the proper layout of the server response!
@varantavers
@varantavers 2 місяці тому
Rust mentioned, uses Framework. Instant like.
@itwsntme
@itwsntme Місяць тому
That was very clear
@slendi9623
@slendi9623 2 місяці тому
11:58 this path traversal makes me cry
@Eunakria
@Eunakria 2 місяці тому
it's probably worth noting that even after fixing the path traversal attack, there are a number of other vulnerabilities in this implementation that make it very unlikely for me to recommend it for even small-scale deployments. just off the top of my head: rate limiting of any kind is nonexistent, resource exhaustion is trivially possible by sending an arbitrarily large request, any client can take down the server by requesting a nonexistent file, etc.. there are also a number of more subtle path traversals; even if you check for paths that contain `..` segments, you still have to account for paths that start with two slashes, etc..
@emjizone
@emjizone 2 місяці тому
Laurence Tratt and @Computerphile, I hope you'll soon make a video explain how an why this naive server is so damn *vulnerable* to many sorts of attacks, particularly BF, DoS and LL attacks.
@pixalquarks4623
@pixalquarks4623 2 місяці тому
I too made a http server, which was just a todo api app. Learnt how http request actually works and parsing them. Fun project, got to learn a lot. Wanted to learn on the security part of this, any insights or references to look into?
@tnetroP
@tnetroP 2 місяці тому
The Go standard library says hello :)
@sabuein
@sabuein 2 місяці тому
Thank you.
@felixmerz6229
@felixmerz6229 2 місяці тому
I didn't know you could change indents in visual mode. More nvim knowledge unlocked.
Rust and RAII Memory Management - Computerphile
24:22
Computerphile
Переглядів 209 тис.
Garbage Collection (Mark & Sweep) - Computerphile
16:22
Computerphile
Переглядів 230 тис.
0% Respect Moments 😥
00:27
LE FOOT EN VIDÉO
Переглядів 34 млн
одни дома // EVA mash @TweetvilleCartoon
01:00
EVA mash
Переглядів 4,7 млн
Transport Layer Security (TLS) - Computerphile
15:33
Computerphile
Переглядів 463 тис.
Every programming language explained in 15 minutes | Prime Reacts
43:42
ThePrimeTime
Переглядів 358 тис.
I made a web server In C like a true sigma
3:19
Imran Rahman
Переглядів 474 тис.
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Переглядів 892 тис.
The purest coding style, where bugs are near impossible
10:25
Coderized
Переглядів 806 тис.
Optimising Code - Computerphile
19:43
Computerphile
Переглядів 136 тис.
Post Office Horizon Scandal - Computerphile
16:27
Computerphile
Переглядів 206 тис.
3 Types of Algorithms Every Programmer Needs to Know
13:12
ForrestKnight
Переглядів 413 тис.
The ULTIMATE Raspberry Pi 5 NAS
32:14
Jeff Geerling
Переглядів 1,1 млн