$ diff -u phttpget.c.orig phttpget.c
--- phttpget.c.orig 2012-04-05 10:58:52.000000000 +0900
+++ phttpget.c 2012-04-05 11:04:25.000000000 +0900
@@ -44,7 +44,7 @@
#include <sysexits.h>
#include <unistd.h>
-static const char * env_HTTP_PROXY;
+static char * env_HTTP_PROXY;
static char * env_HTTP_PROXY_AUTH;
static const char * env_HTTP_USER_AGENT;
static char * env_HTTP_TIMEOUT;
@@ -136,6 +136,11 @@
p = strchr(env_HTTP_PROXY, '/');
if (p != NULL)
*p = 0;
+ if (strchr(env_HTTP_PROXY, '@')) {
+ proxy_auth_user = strsep(&env_HTTP_PROXY, ":");
+ proxy_auth_pass = strsep(&env_HTTP_PROXY, "@");
+ p = strchr(env_HTTP_PROXY, '@');
+ }
p = strchr(env_HTTP_PROXY, ':');
if (p != NULL) {
*p = 0;