Earlier quoted context omitted.
> I like the idea of Pump, and am tired of frameworks protecting me from HTTP. if you don't like being "protected from http" why not write raw wsgi applications?
How is a gateway that reads, buffers, and parses HTTP headers into an environment object [1] before turning it over to your "raw wsgi application" not protecting it from HTTP? WSGI protects you from HTTP. CGI protects you from HTTP. mod_python and mod_perl protect you from HTTP. If you're unable to read and parse the complete HTTP request yourself -- perhaps incrementally, there's an idea -- you're protected from HTT…
Show HN: Pump, a dead simple Pythonic abstraction of HTTP.
61–63 of 63 posts
Re: Show HN: Pump, a dead simple Pythonic abstraction of HTTP.
#62I never understand the mentality of modern wsgi/cgi design. Passing parameters using environ? Why not directly as a python request object?
For consistency. If there was a request object, there would need to be some sort of standard implementation that there was always access to so that the object could be properly instantiated, instance tested, etc. By using a plain old dict, you ensure compatibility at the cost of attribute access. Also because WSGI is designed to be low-level, and if you want a request object you should really be using a library or fr…
Re: Show HN: Pump, a dead simple Pythonic abstraction of HTTP.
#63Earlier quoted context omitted.
Ianb, may I inquire as to what is the difference you mean between servlets and cgi. A cgi written in perl for example, was essentially a perl servlet, I think. How is the CGI model fundamentally different from a servlet model, where your application code is given a request as a parameter to a function, and must return a response?
> How is the CGI model fundamentally different from a servlet model, Since both are web server to application server interfaces, they aren't fundamentally different - the difference is cgi was language independent and hence defined for the common minimum. cgi couldn't have been defined in request and response objects - it would have caused trouble for languages which doesn't have objects. > where your application cod…