Discards all headers that we don't want to persist across requests.
765207
public function discardNonPersistentHeaders()
    {
        foreach ($this->headers as $k => $v) {
            if (!in_array($k, self::$HEADERS_TO_PERSIST)) {
                unset($this->headers[$k]);
            }
        }
    }
216566
def invalidate_all(self):
        
        for fname in os.listdir(self.cache_path):
            if fname.startswith(self.func.__name__ + "."):
                os.remove(os.path.join(self.cache_path, fname))
221192
private void clearAllHeaders() {
        final boolean bTrace = TraceComponent.isAnyTracingEnabled();
        if (bTrace && tc.isEntryEnabled()) {
            Tr.entry(tc, "clearAllHeaders()");
        }

        HeaderElement elem = this.hdrSequence;
        while (null != elem) {
            final HeaderElement next = elem.nextSequence;
            final HeaderKeys key = elem.getKey();
            final int ord = key.getOrdinal();
            if (storage.containsKey(ord)) {
                // first instance being removed
                if (key.useFilters()) {
                    filterRemove(key, null);
                }
                storage.remove(ord);
            }
            elem.destroy();
            elem = next;
        }
        this.hdrSequence = null;
        this.lastHdrInSequence = null;
        this.numberOfHeaders = 0;
        if (bTrace && tc.isEntryEnabled()) {
            Tr.exit(tc, "clearAllHeaders()");
        }
    }
490624
function cleanHeaders(e) {
  for (var headerIndex = 1; headerIndex < 7; headerIndex++) {
    var headers = e.getElementsByTagName('h' + headerIndex);
    for (var i = headers.length - 1; i >= 0; --i) {
      if (getClassWeight(headers[i]) < 0 || getLinkDensity(headers[i]) > 0.33) {
        headers[i].parentNode.removeChild(headers[i]);
      }
    }
  }
}
1212182
def cleanup_storage(*args):
    """"""
    ShardedClusters().cleanup()
    ReplicaSets().cleanup()
    Servers().cleanup()
    sys.exit(0)
265745
public void deactivateAll() {
        for (String scheme : new String[] {"http", "https"}) {
            InetSocketAddress originalProxy = originalProxies.remove(scheme);
            if (originalProxy != null) {
                System.setProperty(scheme + ".proxyHost", originalProxy.getHostName());
                System.setProperty(scheme + ".proxyPort", Integer.toString(originalProxy.getPort()));
            } else {
                System.clearProperty(scheme + ".proxyHost");
                System.clearProperty(scheme + ".proxyPort");
            }
        }

        if (originalNonProxyHosts.isEmpty()) {
            System.clearProperty("http.nonProxyHosts");
        } else {
            System.setProperty("http.nonProxyHosts", Joiner.on('|').join(originalNonProxyHosts));
        }
        originalNonProxyHosts.clear();
    }
359777
public function resetAll()
    {
        $this->clearHeaders();
        $this->clearOptions();
        $this->clearRequestParams();
        $this->clearCookies();
        $this->clearCookieFile();
        $this->reset();
    }
1251782
function pruneHeaders(requestHeaders) {
  const headers = Object.assign({}, requestHeaders);

  delete headers.trackingid;
  delete headers.authorization;

  return headers;
}
688484
public function clear()
    {
        $this->_headerCollection = null;
        $this->_cookies = null;
        $this->_statusCode = 200;
        $this->reasonPhrase = 'OK';
        $this->data = null;
        $this->bodyRange = null;
        $this->isSent = false;
        $this->setBody(null);
    }
1276954
def clean_headers(self):
        """"""
        if not isinstance(self.request.get('headers'), dict):
            return self
        headers = self.request['headers']
        if 'Cookie' in headers:
            self.clean_cookie()
        for key in headers:
            # cookie will be checked in other methods.
            if key == 'Cookie':
                continue
            new_request = deepcopy(self.request)
            new_headers = deepcopy(headers)
            new_headers.pop(key)
            new_request['headers'] = new_headers
            self._add_task('headers', key, new_request)
        return self
783171
public static void cleanup ()
  {
    if (MimeTypeInfoManager.isDefaultInstantiated ())
      MimeTypeInfoManager.getDefaultInstance ().reinitializeToDefault ();
    if (MicroTypeConverterRegistry.isInstantiated ())
      MicroTypeConverterRegistry.getInstance ().reinitialize ();
    if (XMLSchemaCache.isInstantiated ())
      XMLSchemaCache.getInstance ().clearCache ();
    XMLSchemaCache.clearPerClassLoaderCache ();
  }
1349210
@Override
    public void clear() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(tc, "Clearing this request: " + this);
        }
        super.clear();
        this.myMethod = MethodValues.UNDEF;
        this.myScheme = null;
        this.myURIBytes = SLASH;
        this.myURIString = null;
        this.myQueryBytes = null;
        this.queryParams = null;
        this.sUrlHost = null;
        this.sHdrHost = null;
        this.iUrlPort = HeaderStorage.NOTSET;
        this.iHdrPort = NOT_TESTED;
    }
226208
public void doDelete(String url, HttpResponse response, Map<String, Object> headers) {
        response.setRequest(url);
        httpClient.delete(url, response, headers);
    }
701892
public function cleanParams()
    {
        $_GET    = array();
        $_POST   = array();
        $_FILES  = array();
        $_COOKIE = array();

        foreach ($this->getRequestHeader() as $key) {
            if (array_key_exists($key, $_SERVER)) {
                unset($_SERVER[$key]);
            }
        }
    }
350758
def clear(self):
        """"""
        self._srcs = []
        self._diffuse_srcs = []
        self._src_dict = collections.defaultdict(list)
        self._src_radius = []
1203680
def end_headers(self):
        """"""
        if self.request_version != 'HTTP/0.9':
            self._headers_buffer.append(b"\r\n")
            self.flush_headers()
358254
public RequestHeader clearPrincipal() {
        return new RequestHeader(method, uri, protocol, acceptedResponseProtocols, Optional.empty(), headers, lowercaseHeaders);
    }