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

Re: FW: HTTPAPI IP address



hi Peter,

Peter Connell wrote:
> I'm only interested in logging the IP address resolved from the url
> input to the request.

What about proxies? If HTTPAPI is configured to go through a proxy, it 
currently doesn't resolve the end-point's IP address, it only resolves 
the proxy's IP address. Which should HTTPAPI return in that instance the 
proxy's address or the end-point?

> I guess either method could return a data structure comprising the
> components.

Components of what?   Do you need other information besides the IP address?

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

You could do that -- but it wouldn't always be accurate.  For example, a 
DNS lookup on www.google.com will result in a different IP address 
almost every time. That's one way that Google does load-balancing across 
multiple servers, they provide a different IP address on each lookup, 
thus moving the workload to a different computer on each request.

So your call to gethostbyname() might return a different IP address than 
  HTTPAPI did when it called gethostbyname().


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

So if it begins with a slash, you're using GSK_KEYRING_FILE, and 
otherwise you use GSK_OS400_APPLICATION_ID?  That seems reasonable to 
me. Send me your copy of https_init() (I assume that's all you changed) 
and I'll incorporate your changes in the next release.


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

Yep, that's a problem -- not just for peSoapAction but also for 
peContentType. That needs to be fixed, but it's hard to do without 
breaking backward compat.  I wish I had more time to work on it...
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------