This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Persistent vs non persistent connections

0

I am trying to verify which type of connection is being made - persistent or non persistent. I see the following and if someone could explain what each of these mean

Keep-Alive: 300 
Connections:keep-alive

Keep-Alive: timeout=max=100

asked 29 Aug ‘11, 12:44

Maxx's gravatar image

Maxx
1111
accept rate: 0%

edited 29 Aug ‘11, 16:09

SYN-bit's gravatar image

SYN-bit ♦♦
17.1k957245


One Answer:

1

If this is exactly what was in the trace file, the connection will not be persistent as the headers are not correct. The correct header would be:

Connection: keep-alive

Please note that:

  • In HTTP/1.0 the connection is non-persistent by default unless you add the "Connection: keep-alive" header in the http request. After that, it is up to the server to choose whether to use a persistent connection or not

  • In HTTP/1.1 the connection is persistent by default unless you add the "Connection: close" header to the http request. In which case the server has to close the connection the requested object has been sent.

answered 29 Aug '11, 16:14

SYN-bit's gravatar image

SYN-bit ♦♦
17.1k957245
accept rate: 20%