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

Proxy support for HTTPAPI



Hi Scott and all others,

as many of you (including me :-)) were looking proxy support with
authentication, but apparently noone ever wrote a patch, I sat down
and created one. (Thanks go to Brian Doherty here for his mail in April
2006 which gave me an idea about how to implement it.)

The attached file is in UNIX patch(1) format (there should be some
precompiled versions for AIX around - you could run that in PASE). For
those of you who can't use the patch command, just a little
explanation on the syntax:
 - The lines beginning with "diff -ur ..." represent the command that
   was executed to generate this patch file, you can ignore them

 - The lines beginning with "+++" and "---" contain the name of the
   files that were compared. The interesting part should be the least
   significant part of the path (including the member name)

 - The lines beginning with "@@" contain the line numbers of following
   block ("chunk" called in patch terminology) before and after patching

 - The lines beginning with "-" and "+" and determine the lines added or
   removed to the actual source file

 - The lines starting with a blank are just context, to orient oneself
   in the source code :-)


My patch adds three new functions (which have to be included in
QSRVSRC,HTTPAPI1 or HTTPAPI2, whether if you use SSL or not):
 - http_setproxy(host: port):
   Easy. Sets the proxy used for connecting.

 - http_proxy_setauth(authentication_type: username: password):
   Like http_setauth with the difference that it only supports
   HTTP_AUTH_BASIC. I have no proxy with Digest Authentication here, so
   I couldn't impelement HTTP_AUTH_MD5_DIGEST, but maybe there's a
   volunteer on this list? :-)

 - http_proxy_getauth(basic: digest: realm):
   Returns whether basic or digest authentication is possible and the
   proxy server's realm.


Likewise to HTTP_NDAUTH, a new error constant HTTP_PXNDAUTH has been
invented which tells the caller to authenticate himself at the proxy.

Regards,
  Sebastian

Attachment: libhttp.patch
Description: libhttp.patch

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------