W3C home > Mailing lists > Public > www-jigsaw@w3.org > January to February 1998

Re: size of downloaded resource

From: Gil Hansen <gil@objs.com>
Date: Fri, 09 Jan 1998 17:03:27 -0600
Message-Id: <199801092303.RAA28884@mailhost.onramp.net>
To: Yves Lafon <ylafon@w3.org>, Gil Hansen <gil@objs.com>
Cc: www-jigsaw@w3.org
At 06:53 PM 1/8/98 +0100, Yves Lafon wrote:
>On Sun, 21 Dec 1997, Gil Hansen wrote:
>> How does one obtain the size of a downloaded resource? The following always
>> yields zero: int size = reply.getContentLength();
>The code is well reply.getContentLength(), but it has to called in the 
>outgoingFilter(Request request, Reply reply);
>Which is after the resource has been downloaded (I assume that you are 
>talking about a client-side filter...)

I have a client-side filter that invokes a service's methods beforeGET and
afterGET. The sizes of the w3c.www.protocol.http.Reply does not agree with
the sizes of the w3c.jigsaw.http.Reply (obtained by modifying
w3c.jigsaw.Client). This occurs when downloading www.consumerworld.org
(which is interesting because it downloads many offsite URLs). Actually,
the sizes are mostly -1. [It should be noted that the sizes match when
downloading, for example,  www.dec.com and www.objs.com] The following
trace excerpt illustrates this:

==>Capture a new host: www.consumerworld.org
request URL: http://www.consumerworld.org/
  start:   Thu Jan 08 21:45:52 CST 1998
***Service.beforeEvent() called...
***Service.beforeGET() called: http://www.consumerworld.org/gifs/conglox2.gif
Processing Server-Level Outgoing Filter...
***Service.afterEvent() called...
***Service.afterGET() called: http://www.consumerworld.org/gifs/conwbak2.gif
@@@end before start
  end:   Thu Jan 08 21:37:58 CST 1998
  request size: -1
  reply size: 1564
Processing Server-Level Outgoing Filter...
***Service.afterEvent() called...
***Service.afterGET() called: http://www.consumerworld.org/gifs/marqpric.gif
@@@end before start
  end:   Thu Jan 08 21:37:58 CST 1998
  request size: -1
  reply size: 2993
Processing Server-Level Outgoing Filter...
***Service.afterEvent() called...
***Service.afterGET() called: http://www.consumerworld.org/gifs/conglox2.gif
@@@end before start
  end:   Thu Jan 08 21:37:58 CST 1998
  request size: -1
  reply size: -1
======= w3c.jigsaw.http.Client: client-1(socket-clients:20),
contentLength=13166, size sent=13166: request
http://www.consumerworld.org/gifs/conglox2.gif, duration = 781 
======= w3c.jigsaw.http.Client: client-3(socket-clients:18),
contentLength=2993, size sent=2993: request
http://www.consumerworld.org/gifs/marqpric.gif, duration = 621

Note that there is a second problem with the duration of the downloads. The
end times of both replies are after the start of the download of
www.consumerworld.org. The start and end times were obtrained from
request.getDate() and reply.getDate(), respectively, for the request in the
beforeGET() method and the reply in the afterGET() method.

In summary, I believe the size and date in the
w3c.www.protocol.http.Request and w3c.www.protocol.http.Reply classes are
not being maintained correctly in particular situations.


Gil Hansen, Ph.D.                       email: gil@objs.com
Object Services & Consulting, Inc.      phone: 972-712-2705/2706 (FAX)	
http://www.objs.com			      http://www.objs.com/gil.htm
Received on Friday, 9 January 1998 18:03:58 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:32 UTC