removing unused result variable on truncating state file
avoiding error when connection is closed while is doing 'upload_pass' to other location/server
fix to compile with nginx 1.4.1+ versions
Merge pull request #1 from wandenberg/2.2

'segmentation fault' when connection is closed before the internal redirect finish