Add support for :disposition => 'attachment' in middleware