Hacker News new | ask | show | jobs
by seanp2k2 3387 days ago
Funny aside, it took me many months as a teenager who did not know the ways of *nix to "get" CGI. It was very enlightening to eventually realize that it was so simple that it had eluded my understanding. My mind, coming from messing with Win32 in Visual Basic 5, refused to believe that you just make a program that writes plaintext out to the console, and that text is what gets sent to the browser, and that just works.

If you work on web apps, you absolutely owe it to yourself to understand HTTP and CGI. The one page I'd recommend to quickly grok CGI is http://www.oreilly.com/openbook/cgi/ch01_04.html . Also learn how to use cURL and understand everything that is happening inside the Network tab of Chrome or Firefox dev tools (they're very similar these days). Set up MITMProxy between your proxy server and your apache2/nginx, put it into reverse proxy mode and point the proxy at it, then it at httpd, and understand what you're seeing.

I don't have a good link for HTTP but I promise it'll help a ton with debugging things and generally having a sense of what's going on at every level.