Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

how can such an old browser run a C program embedded within it? Can someone elaborate how this could have been done


NCSA httpd introduced the Common Gateway Interface which allows you to execute any binary, and whatever it puts on stdout is sent as the reply. Back then it was typically a Perl script or a compiled C binary.

https://en.m.wikipedia.org/wiki/Common_Gateway_Interface


My company makes a DAS(distributed Antenna System) product with an embedded web interface. All of our web sites have C/C++ cgi back ends. There are more makefiles in the Web folder than the whole rest of system. It is quite mind boggling. But the engineer that has control over this area is stuck in the 90s.


My main objection to such systems is security. It is difficult enough to take care of it in modern frameworks, but in C?


Pretty sure the C was on the server in this instance.


Yes CGI was just an API between the web server and a an executable to handle the call, really no different than how Apache talks with mod-PHP.

C was used, but Perl quickly became more popular.


Never saw /cgi-bin/ in a form URL? Or the occasional xycorp_isapi.dll? :)


Found the old guy :). Back then it was quasi-normal to just write your own HTTP server. A TCP socket that just slapped some headers on whatever it was reading from disk. Now everything is so complex...

I remember using server push, and the CGI interface was a hell of a lot simpler than the 8000 levels of abstraction my Typescript Angular apps going through before they hit the wire.

The worst part is that the majority of the added complexity is useless. Instead of replacing the bad parts of HTTP, HTML, JS, and CSS we just build more shit on top of it. This requires more hacks and just up the complexity level even more.


“The cgi-bin C program”

That's server side C code speaking HTTP using the common gateway interface protocol.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: