Hi list,
I'm planning to add http proxy support to http.client. Here's the API
I thought of, please feel free to give some feedback :)

- add a "proxy" slot to the request object. (Or maybe subclass request
as client-request and only add that slot to client ? I think that
would be better for maintenance, but it's a bigger change. What do you
think ?)

- use string global variables (*not* SYMBOL:, so that one can set it
from the command line) or set the request slot directly so that one
can do:
./factor -http.proxy=http://localhost:3128
or "http://localhost:3128"; "http.proxy" set-global
or "http://localhost:3128"; "http.proxy" [ ... http-get ] with-variable
or <request> ... URL" http://localhost:3128"; >>proxy

- the "http.proxy", "https.proxy" and "no_proxy" variables are used to
fill the proxy slot of the request when using  <client-request> (so
http-get, etc all have it)

- use the "http_proxy" "https_proxy" "no_proxy" environnement variable
as a last resort. I don't know about windows and macosx ?

As far as the code for *http* (not https) access goes, I think the
following patch is all that there is to do (it's missing checking the
non proxy host list, and setting the http or https proxy depending on
the url) ? http://paste.factorcode.org/paste?id=3826

For https, I need to do an HTTP connect first, then send regular http
request I think. Will try that later.

Cheers,
Jon

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to