docs: protected String extractLocation(Map<String, List<String>> headers) throws MalformedURLException {
          for (Map.Entry<String, List<String>> head : headers.entrySet()) {
              if ("Location".equalsIgnoreCase(head.getKey())) {
                  List<String> locs = head.getValue();
                  if (locs != null && locs.size() > 0) {
                      String location = locs.get(0);
                      if (location != null) {
                          return location;
                      } else {
                          return null;
                      }
                  }
              }
          }
          return null;
      }