Protocols.HTTP.Server.SSLPort and connection: close header

Stefan Gluszek <[email protected]> Fri, 26 Jan 2018 11:13:10 +0100
Newsgroups gmane.comp.lang.pike.user
Message-ID <CABER6e7WFu6sYAh4+m82rrD34W0Su9WXpEert9yUeYYqfmnvpw@mail.gmail.com>
Hi,
I have an issues with using the HTTP SSLPort together with connection:
close header.

So I set up a simple HTTPS server using the SSLPort:

void got_connection(Protocols.HTTP.Server.Request r)
{
    mapping m = ([
        "data": "test",
    ]);

    r->response_and_finish(m);
}

void new_connection()
{
    werror("new_connection\n");
}

int main()
{
    Protocols.HTTP.Server.SSLPort ssl_port;
    ssl_port = Protocols.HTTP.Server.SSLPort(got_connection, 9999);
    return -1;
}

Now making a request with connection: close I get an empty reply from my server.
curl -k -H "Connection: close" https://localhost:9999/
wget --no-http-keep-alive --no-check-certificate https://localhost:9999/

Shouldn't that work? Is there anything I am missing? Making a similar
request to apache seems to work just fine.

/Stefan