Re: [Rabbit-proxy-development] Getting Contentlength
Brought to you by:
ernimril
From: <isc...@gm...> - 2007-01-08 21:27:08
|
Hello Robert, I will try to do the suggested workaround tomorrow. So by implementing the TrafficLogger I would get some more traffic then the real size of the resource. This would be ok. I would test and maybe get a feeling for the difference. Having not used the TrafficLogger, how would i get it (con.getTrafficHandler().getClient().getAmount() for example?) And what would it show me if i use it from a filter (httpInFilter in my case). Is the complete resource / byte count available at that moment? Or should i get the right data later? And from what starting point? By the way, thanks for the quick help. I was suprised how quick the answers came. Ingo Robert Olofsson schrieb: > Ingo Schröder wrote: > >> my first interest would be getting all the traffic from the client to >> the proxy. I would like to filter all the clients sending more than >> 512 kB as a fileupload for example. >> > > Ok, there is no easy way to do that at the moment, you have to add some > code. Here is what I would do: > 1) create a class that implements TrafficLogger, maybe taking a > Connection in its constructor. > 2) Add Connection as a parameter to TrafficLoggerHandler > 3) Change the client-parameter to be the class from 1. > > Does that help? > > There are still a few things to think about here: > 1) Chunked uploads will count the bytes transferred, not the resource > size. > 2) Multipart uploads will count the bytes transferred, there may be many > resources in the upload. > > Does that help? > > /robo > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Rabbit-proxy-development mailing list > Rab...@li... > https://lists.sourceforge.net/lists/listinfo/rabbit-proxy-development > > |