public function location($url = null)
    {
        deprecationWarning(
            'Response::location() is deprecated. ' .
            'Mutable responses are deprecated. Use `withLocation()` and `getHeaderLine()` instead.'
        );

        if ($url === null) {
            $result = $this->getHeaderLine('Location');
            if (!$result) {
                return null;
            }

            return $result;
        }
        if ($this->_status === 200) {
            $this->_status = 302;
        }
        $this->_setHeader('Location', $url);

        return null;
    }