Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

Commit

Permalink
discardBody()
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-leonov committed May 24, 2010
1 parent e1b1804 commit 5abb4ba
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.markdown
Expand Up @@ -325,4 +325,18 @@ The handler:
}


discardBody()
-------------

This method ask nginx to discard body with all the tenderness it has. It is not a trivial thing ignoring request body, but we can relax relying on nginx wisdom ;)

function handler (r) {
r.discardBody()
r.sendHttpHeader('text/plain; charset=utf-8')
r.puts('the request body is not good for me')
r.sendSpecial(Nginx.HTTP_LAST)
return Nginx.OK
}

0 comments on commit 5abb4ba

Please sign in to comment.