fix KeyError exception

include KeyError in except statement in order to prevent exception throw when there is no 'Content-Length' in http header response