Re: Client side filter-determining server url/port

Hi,

Thanks for the answer but this is not what I want. I am sorry to cause the
confusion.

When I run Jigsaw as a proxy , it listens at hostname:8001. My client-side
filter needs
to know this hostname:8001. When I tried the approach suggested by most of you,
it always returns "null" as the url (as expected) as my requests were not cmoing
from a proxy.

I somehow need to access to the getURL() fn in httpd.java. Is this possible...?

Thanks in advance!



Jacob W Anderson wrote:

> > 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."     | \____(      )___) )___
>                                              \______(_______;;; __;;;



--
Mahesh Joshi

---------------------------------------------------------------
Mahesh Joshi                      {O} 415-254-5441
KnowledgeSet Corp.                {H} 510-792-3955
                  mjoshi@kset.com
http://www.kset.com/cdweb : "Dynamic" CD-ROMs!!!
----------------------------------------------------------------

Received on Monday, 13 October 1997 20:19:39 UTC