code: public static void moveHeader(HttpResponse response, String srcName, String targetName) {
          if (response.containsHeader(srcName)) {
              LOG.info("Moving header {} to {}", srcName, targetName);
  
              Header[] headers = response.getHeaders(srcName);
              response.removeHeaders(targetName);
              for (Header h : headers) {
                  response.addHeader(targetName, h.getValue());
              }
              response.removeHeaders(srcName);
          }
      }
docs: This method can be used directly to move an header.
  
  @param response
  HTTP response
  @param srcName
  source header name
  @param targetName
  target header name