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

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
-----------------------------------------------------------------------