I am fairly new to HTTP and pardon me if the question looks stupid. I cant get my head around the HTTP keepalive logic. I am studying HTTP definitive guide.
We send multiple requests , response over a single tcp connection is clear , but how this works with proxy is not getting through my head. Proxy is not supposed to forward keepalive header(this is hop by hop) , then how server will know then connection has to be open ? If the server doesnt know , it will send a close in response packet ? So how does the client side connection still forward more requests on the same tcp connection.
Example
client(10.0.0.1)---------Proxy(1.1.1.1)----------(1.1.1.5)Server
client sends request with connection: keepalive to 1.1.1.5 . Proxy receives and : 1) forwards it blindly if HTTP/1.0 2) Proxy sends connection 1.1.1.1 -> 1.1.1.5 to server , is the connection: keepalive sent or not ?
It says proxy do not cache or forward connection and keepalive headers , then how does server know it shoud keep it open or close it.
Please help.... I am kinda lost here