Re: [squid-users] HTTP requests

From: Henrik Nordstrom <hno@dont-contact.us>
Date: 06 Feb 2003 14:38:08 +0100

Squid uses the HTTP protocol over TCP, as specified in RFC2616 and it's
predecessors.

Connections browser<->squid and squid<->servers is managed separately.

tor 2003-02-06 klockan 11.21 skrev Bilal:
> Hi,
> I would like to know how Squid handles a socket connection with a user
> after the connection has been established. I'm assuming that Squid uses
> the same socket to handle the requests and responses to all the objects
> that make up a web page. For example, if a user requests URL A and this
> page consists of text and graphics, then is the same socket used to
> handle all the requests and responses for this page?

Depends on the browser and the responses. Usually there is more than one
connection used with some requests on each..

> How does Squid know that all the objects have been requested and that
> the socket should be closed? What determines this?

The HTTP specification specified how HTTP messages are delimited. For
Squid (HTTP/1.0) this is either by a Content-Length header or by closing
the connection.

> Is it possible for a user to request URL B, and this URL is handled via
> the same socket as URL A was? How does Squid take care of this?

Yes.

Responses are received in the same order as their requests.

However, Squid never makes more than one concurrent request per outgoing
TCP connection to avoid some messy situations if the first
request/response fails..

Regards
Henrik

-- 
Henrik Nordstrom <hno@squid-cache.org>
MARA Systems AB, Sweden
Received on Thu Feb 06 2003 - 06:38:24 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:13:16 MST