Re: [squid-users] HTTP requests

From: Marc Elsen <marc.elsen@dont-contact.us>
Date: Thu, 06 Feb 2003 14:29:55 +0100

Bilal wrote:
>
> 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

  Squid doesn't know anything about web pages (see further on).

> page consists of text and graphics, then is the same socket used to
> handle all the requests and responses for this page?

 Basically your modelling of browser - squid interaction is wrong.
 1) http is stateless
 2) squid's actions are browser driven, it is always the browser
 that asks objects to squid. Squid is not an 'active' component
 in this process so to speak.

 
 This being said :

 Unless persistent connections are being used, each object is
 fetched by the browser over a new tcp connection (request).
 Persistent connection can make browsers fetch multiple
 objects in one tcp connection.

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

  It doesn't ,the browser (or client) will tell squid when it is
finished
  asking for objects.

>
> 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?

  That is irrelevant. In TCP two seperate connection to a remote
  box can not use the same socket.
  
  M.

>
> Thanks
> B

-- 
 'Time is a consequence of Matter thus
 General Relativity is a direct consequence of QM
 (M.E. Mar 2002)
Received on Thu Feb 06 2003 - 06:30:04 MST

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