Re: Client side filter-determining server url/port

> My filter needs to find out what host and port the Proxy is running on.
> I read the source and documentation, but it looks like I am missing something as
> I still cant find a way in which I can retrieve this information from my
> Client-side filter.
> 

All of that information is contained in the Request object, which is
passed through the ingoing and outgoing methods of your filter.  So,
to get the information that you need, just do this:

void ingoingFilter(Request request) {
  URL url = request.getURL();
  URL proxy = request.getProxy();
  String proxy_host = proxy.getHost();
  int proxy_port = proxy.getPort();
}

easy as can be - but you are correct, this doesn't appear to be in
the documentation - I found it by rummaging through the Request
code.

-- Jake
+-----------------------------------------------------+   \||/
|              Jacob W. Anderson                      |    |  @___oo
|      GTE Internetworking, Powered by BBN            |   / (__,,,,|
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|^\/ _)
|EMail: jwanders@bbn.com | 9655 Granite Ridge Dr.     |/   _)
|Voice: 619-495-2638     | Suite 245                  |  / _)
|  Fax: 619-495-7313     | San Diego, CA, 92123       |  | )_)
+------------------------------------------<  >-------(,,) )__)
"My code doesn't have bugs,                 ||      /    \)___)\
          it develops random features."     | \____(      )___) )___
                                             \______(_______;;; __;;;

Received on Monday, 13 October 1997 12:13:28 UTC