Fix NPE in HttpResponse.getHeadersSafe, close #1286