Handling null original request.
Closing response/content when applicable.
Commons-io added for tests.