Frage

I have the following get in my restlet app:

 @Get
public String represent(Variant variant) throws ResourceException
{
    String text = "returntext";

    text+="\r\n";
    return text;
}

When checking the response from invoking this service, I get the following:

CFG - HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Type: text/plain;charset=UTF-8
Date: Mon, 29 Jul 2013 19:59:37 GMT
Server: Restlet-Framework/2.0.9
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
Content-Length: 118
Connection: keep-alive

Shouldn't the Connection be: closed as opposed to keep-alive?

I think is causing the connection to get tied up because I can only invoke the service once.

War es hilfreich?

Lösung

@Ab is correct. http 1.1 has a keep alive. This was the problem.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top