> But as a very tivial example I want be able to do something like
>
> module Rack
> class Myfilter
> def initialize(app)
> @app = app
> end
>
> def call(env)
> request = Rack::Request.new(env)
> request.params.delete('someparam')
> # but at this point I want/need to modify env
> @app.call(env)
> end
> end
> end
>
> I'm not sure how I'd then get the modified env back, do you have to
> literally modify something like env['query_string'], also at this
> point the content length would be different so I'd have to update that
> also.
Do you mean parameters in the request URI? or in the body? in the first case
the content-length should not be modified.
> Most of the applications I've seen are an endpoint and an app in
> itself than sitting in the middle of the incoming request, and I'm yet
> to find an example of modifying the incoming params.
I expect that Rack is not designed for that, as changing the request is not a
very common usage (IMHO).
--
Iñaki Baz Castillo <i...@aliax.net>