How, in this century, did anyone think passing http url params as env vars was an acceptable design? Fix is incomplete & goahead is unfixable.https://twitter.com/elttam/status/942630494054752256 …
The idea is that the user writes CGI as shell scripts the same way you write (hideous, legacy, deprecated) PHP, using $paramname for query params.
-
-
Gack. Now the question is, how much breaks if you implement the spec only (QUERY_STRING has the query params)?
-
All existing code written for GoAhead. That's why I called it unfixable.
-
It's analogous to if you made a C-like language where the only input primitive was gets(). There'd be no way to fix it without overhauling all existing code.
-
Well, two mmap() and a signal handler. But no _practical_ way, anyway. :)
-
At best that lets you safely abort the program on excess input; there's still no way to cleanly recover.
-
I'm not saying it's a good idea, but http://pubs.opengroup.org/onlinepubs/009695399/functions/siglongjmp.html … is posix. (Black belt in disgusting solutions to impossible problems.)
-
longjmp is not AS-safe, so it can be used in a signal handler iff the signal does not interrupt any AS-unsafe functions. All of stdio is AS-unsafe.
-
You keep thinking threading is a mandatory part of C.
- 8 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.