[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: FW: HTTPAPI IP address



Scott,
I'm only interested in logging the IP address resolved from the url
input to the request.
I will be using a custom control file to register logging options for
each IP address to provide the ability to either not log, log the
request and response packets or a verbose log (ie your debug output).  
A callback via an exit point in the procedure that initially resolves
this would do fine.
But just as good would be a separate procedure that could be called
after the request so that I could get an IP address even if the
connection attempt fails.
I would not be using urls that could not be resolved.
I guess either method could return a data structure comprising the
components.

I figure I'll just add a separate procedure that does a gethostbyname()
then.
I was trying to avoid the overhead of repeating that.

BTW -
I had to do a minor hack to support the need to use a separate
certificate store as well as an APPID for the DCM.
I needed to replace an existing https request program, written in java,
with one that uses HTTPAPIR4, without having to change the current
administration process by which the client certificate is imported. It
was simple enough to use the APPID field and just check if it is
supplied as a pathname that begins with a slash.
Also, I've had to start using a callback for SoapAction since we have an
endpoint that requires an action string which is a url of over 100
bytes.

Thanks, Peter
	  

 

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott
Klement
Sent: Thursday, 5 February 2009 11:01 a.m.
To: HTTPAPI and FTPAPI Projects
Subject: Re: FW: HTTPAPI IP address

HTTPAPI doesn't currently provide that function.  But, it wouldn't be
difficult to add. I'm wondering what the best way to implement this
would be, though?

Would you want a callback, like the existing http_xproc() routines?

or would you rather have an http_getLastAddr() routine that retrieves
the last IP address used?

how would you like to handle sites that send a redirect?  Such as if
www.example.com should redirect you to www.somewhereelse.com?  Would you
call http_getLastAddr() in between them?  Or should the callback call
your routine twice, once for example.com and once for somewherelse.com?

When you write your routine to log this stuff... are you adding it
individually to every program that calls HTTPAPI?  Would it be better,
instead of a HTTP_getLastAddr() routine, to have a config setting when
you compile HTTPAPI that tells it to insert calls to your logging
routine on every attempt?  That way, you could register it once, during
the build of HTTPAPI, and you'd know that every program that uses that
copy of HTTPAPI would always be logged...

Let me know your thoughts.


Peter Connell wrote:
> 
>      _________________________________________________________________
> 
>    From: Peter Connell
>    Sent: Thursday, 5 February 2009 8:54 a.m.
>    To: 'ftpapi@xxxxxxxxxxxxxxxxxxxxxx'
>    Subject: HTTPAPI IP address
> 
>    Scott,
> 
>    I am about to write some code to do some custom logging of various
>    connections that use the  HTTPAPI API.
> 
>    The first thing for each log entry will be the IP address.
> 
>    I have not been able to see any easy way to get at the IP
>    address, resolved by the API when performing an http request,
instead
>    of having to repeat the url parsing ?
> 
>    Peter
> 
>    ###############################################################
> 
>    This correspondence is for the named person's use only. It may
contain
>    confidential or legally privileged information, or both. No
>    confidentiality or privilege is waived or lost by any
mistransmission.
>    If you receive this correspondence in error, please immediately
delete
>    it from your system and notify the sender. You must not disclose,
copy
>    or rely on any part of this correspondence if you are not the
intended
>    recipient. Any views expressed in this message are those of the
>    individual sender, except where the sender expressly, and with
>    authority, states them to be the views of Veda Advantage. If you
need
>    assistance, please contact Veda Advantage on either :- Australia
>    133124 or New Zealand +64 9 367 6200
> 
> 
> 
> ----------------------------------------------------------------------
> --
> 
> ----------------------------------------------------------------------
> - This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> ----------------------------------------------------------------------
> -

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
#####################################################################################
This correspondence is for the named person's use only. It may contain confidential or legally privileged information, or both. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this correspondence in error, please immediately delete it from your system and notify the sender. You must not disclose, copy or rely on any part of this correspondence if you are not the intended recipient. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of Veda Advantage. If you need assistance, please contact Veda Advantage on either :- Australia 133124 or New Zealand +64 9 367 6200
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------