3 ms·
One of the bits of CGI (I wrote a lot of perl back in the day) is that parts of it are still there, under the covers. Looking at RFC 3875 https://tools.ietf.or
by shagie 7y ago
One of the bits of CGI (I wrote a lot of perl back in the day) is that parts of it are still there, under the covers.
Looking at RFC 3875 https://tools.ietf.org/html/rfc3875 https://tools.ietf.org/html/rfc3875 - you see things like PATH_INFO, PATH_TRANSLATED, QUERY_STRING...
Pull up Java HttpServletRequest, https://javaee.github.io/javaee-spec/javadocs/javax/servlet/http/HttpServletRequest.html https://javaee.github.io/javaee-spec/javadocs/javax/servlet/... and there is getPathInfo(), getPathTranslated(), and getQueryString() along with many of the other parameters that would be familiar to someone writing a CGI.
You can find them in C# - https://docs.microsoft.com/en-us/dotnet/api/system.web.httprequest.pathinfo?view=netframework-4.8 https://docs.microsoft.com/en-us/dotnet/api/system.web.httpr... - PathInfo, QueryString and the like.
You can find them in Haskell - https://hackage.haskell.org/package/happstack-server-7.5.1.1/docs/Happstack-Server-Routing.html https://hackage.haskell.org/package/happstack-server-7.5.1.1... Route by pathInfo and the QUERY_STRING is clear in https://hackage.haskell.org/package/happstack-server-7.5.1.1/docs/Happstack-Server-Internal-Types.html#t:Request https://hackage.haskell.org/package/happstack-server-7.5.1.1...
CGI scripts aren't dead... they just got better plumbing.