Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notice: Undefined index: content-type in nusoap.php on line 7775 #44

Open
wadedung opened this issue Oct 10, 2019 · 0 comments
Open

Notice: Undefined index: content-type in nusoap.php on line 7775 #44

wadedung opened this issue Oct 10, 2019 · 0 comments

Comments

@wadedung
Copy link

Hello.
As title. I got an error when I was using proxy. But It worked without proxy.
I try to compare the distinct between this two condition.
And I found that There was one more header which was returned by proxy.

response with proxy

HTTP/1.1 200 Connection established

HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Server: nginx
.
.
.

response without proxy

HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Server: nginx
.
.
.

And I found relative code at nusoap.php line 2819

/**
     * Test if the given string starts with a header that is to be skipped.
     * Skippable headers result from chunked transfer and proxy requests.
     *
     * @param    string $data The string to check.
     * @returns    boolean    Whether a skippable header was found.
     * @access    private
     */
    function isSkippableCurlHeader(&$data)
    {
        $skipHeaders = array('HTTP/1.1 100',
            'HTTP/1.0 301',
            'HTTP/1.1 301',
            'HTTP/1.0 302',
            'HTTP/1.1 302',
            'HTTP/1.0 401',
            'HTTP/1.1 401',
            'HTTP/1.0 200 Connection established');
        foreach ($skipHeaders as $hd) {
            $prefix = substr($data, 0, strlen($hd));
            if ($prefix == $hd) return TRUE;
        }

        return FALSE;
    }

It only filter HTTP/1.0 200 Connection established.
Why the header HTTP/1.1 200 Connection established should be reserve?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant