4 ms·
> some Ruby CGI scripts Didn't ruby remove its CGI libraries from their standard library somewhat recently. I believe there were mostly helper libs, but I am c
by non-entity 7y ago
> some Ruby CGI scripts
Didn't ruby remove its CGI libraries from their standard library somewhat recently. I believe there were mostly helper libs, but I am curious how that works.
- zrail 7y agoCGI is just running a program in response to a request. Things about the request are put into environment variables and POST/PUT bodies are on stdin. Your program writes HTTP headers, two newlines, and the response body. You don't need libraries. If you have reasonably low traffic CGI can get you really far.
- yjftsjthsd-h 7y ago> If you have reasonably low traffic CGI can get you really far. And even after that, I would expect that CGI augmented with some careful caching (read: all static content and some dynamic content with sensible expiration policies) will get you even farther without having to dramatically change anything.
- cutler 7y agoI built an app in Perl/CGI::Application for a company which ran media campaigns with national brands over a 12-year period. It's not the fastest option but it certainly works.
- jimbokun 7y agoThis would be a nifty exercise for a web programming class. Really internalize a lot about HTTP in a short amount of time.
- castwide 7y agoCGI is still in the stdlib, and AFAIK there's no plan to deprecate it. You might be thinking of a few other methods like URI.escape that have been marked obsolete in favor of CGI equivalents.