Removes the header with the specified name (and optional value prefix)

@param string $name the name of the header
@param string $valuePrefix the optional string to match at the beginning of the header's value
764306
public static function remove($name, $valuePrefix = '') {
		if (empty($valuePrefix)) {
			header_remove($name);
		}
		else {
			$found = self::get($name, $valuePrefix);

			if (isset($found)) {
				header_remove($name);
			}
		}
	}
496018
function(name, value) {
    var regexp, idx;

    // Remove the header from extraHeaders if present.
    regexp = new RegExp('^\\s*'+ name +'\\s*:','i');
    for (idx=0; idx<this.extraHeaders.length; idx++) {
      if (regexp.test(this.extraHeaders[idx])) {
        this.extraHeaders.splice(idx, 1);
      }
    }

    this.headers[Utils.headerize(name)] = (Array.isArray(value)) ? value : [value];
  }
1175928
public final function setHeader($name, $value)
    {
        self::checkString($name);
        self::checkString($value);

        $this->_headers[$name] = $value;
    }
880935
public function getHeaderValue($name, $defaultValue = null)
    {
        $header = $this->getHeader($name);
        if ($header !== null) {
            return $header->getValue();
        }
        return $defaultValue;
    }
574083
public function unsetOpt($name, $valueRegex = null)
    {
        $this->arguments[] = '--unset';
        $this->addNameAndPattern($name, $valueRegex);
        return $this;
    }
179410
public function addHeaderPair( $name, $value, $emptyBefore = NULL )
	{
		$this->headers->setField( new Net_HTTP_Header_Field( $name, $value ), $emptyBefore );
	}
1150654
public static function removeSessionValue(string $name)
    {
        self::ensureSession();
        
        try {
            unset($_SESSION[$name]);
            session_write_close();
        }
        catch (\Exception $ex) {
            error_log("Error trying to remove session value. ");
        }
    }
611715
protected function setHeader(string $name, $value)
    {
        \assert($this->isNameValid($name), "Invalid header name");

        if (\is_array($value)) {
            if (!$value) {
                $this->removeHeader($name);
                return;
            }

            $value = \array_values(\array_map("strval", $value));
        } else {
            $value = [(string) $value];
        }

        \assert($this->isValueValid($value), "Invalid header value");

        $name = \strtolower($name);
        $this->headers[$name] = $value;
    }
672165
public function replace($name, $value = '')
    {
        Types::assert(['string' => [$name, $value]]);

        $header = HeaderFactory::build($name, $value);
        $this->headers[strtolower($name)] = [$header];
    }
637609
public function prependPrefix($prefix)
  {
    $this->deletePrefix($prefix);
    
    $prepend = array($prefix => $prefix);
    $this->_prefixes = array_merge($prepend, $this->_prefixes);
  }
857329
private static function normalizeHeaderName(string $name) : string
  {
    if (0 === preg_match('/^[^\x00-\x1F :]+$/', $name)) {
      throw new InvalidArgumentException(sprintf(
        '%s is not a valid header name.', 
        $name
      ));
    }

    return strtolower($name);
  }
711716
public function unsetHeader($name)
    {
        if (isset($this->outgoing_headers[$name])) {
            $this->debug("unset header $name");
            unset($this->outgoing_headers[$name]);
        }
    }
681839
protected function _sendHeader($name, $value = null)
    {
        deprecationWarning(
            'Will be removed in 4.0.0'
        );

        if ($value === null) {
            header($name);
        } else {
            header("{$name}: {$value}");
        }
    }
654081
public function remove($name, $index = 0)
    {
        $lowerName = strtolower($name);
        unset($this->headers[$lowerName][$index]);
    }
1190772
def _remove_prefix(name):
    """"""
    if isinstance(name, str):
        return _do_remove_prefix(name)
    return [_do_remove_prefix(nm) for nm in name]
50150
private static function removePrefix($str, $prefix)
    {
        if (substr($str, 0, strlen($prefix)) == $prefix) {
            return substr($str, strlen($prefix));
        }
        return null;
    }
1103449
public function formatHeaderAndRemovePrefix($header, $prefix = 'HTTP_') {
        if (str_starts_with($header, $prefix)) {
            $header = substr($header, strlen($prefix));
        }

        return $this->formatHeader($header);
    }