Is it possible to skip request body and send a response?

I’m using access_by_lua function to authorize request before starting
upload process, It works just awesome. But in case when request is not
authorized I would like to send a response skipping the stage of reading
request body. Is this possible in theory or does this contradicts
rfc2616? Currently I can only close connection by discarding the request
body with lingering_timeout set to zero.

Thanks for any help.

Posted at Nginx Forum: