Update POST handling to close the stream a