Bugfix: not closing outputstream when processing put request

Change-Id: I501d464bd6c9e16644c2259baaf164fabf07885e