elm_url: matched between url and proxy environment 17/157217/1
authorJeonghyun Yun <jh0506.yun@samsung.com>
Mon, 23 Oct 2017 11:44:18 +0000 (20:44 +0900)
committerJeonghyun Yun <jh0506.yun@samsung.com>
Mon, 23 Oct 2017 23:04:31 +0000 (23:04 +0000)
@tizen_fix

Change-Id: Ic46db15739a1c86d39b223aa47cf114d52419f3e
Signed-off-by: Jeonghyun Yun <jh0506.yun@samsung.com>
src/lib/elm_url.c

index 95d3801..847f708 100644 (file)
@@ -102,9 +102,23 @@ _elm_url_download(const char *url, Elm_Url_Done done_cb, Elm_Url_Cancel cancel_c
    if (getuid() == geteuid())
 #endif
      {
-        if (getenv("http_proxy")) ecore_con_url_proxy_set(target, getenv("http_proxy"));
+        //TIZEN ONLY (20171023): matched between url and proxy environment
+        /*if (getenv("http_proxy")) ecore_con_url_proxy_set(target, getenv("http_proxy"));
         if (getenv("https_proxy")) ecore_con_url_proxy_set(target, getenv("https_proxy"));
-        if (getenv("ftp_proxy")) ecore_con_url_proxy_set(target, getenv("ftp_proxy"));
+        if (getenv("ftp_proxy")) ecore_con_url_proxy_set(target, getenv("ftp_proxy"));*/
+        if ((!strncmp(url, "http://", strlen("http://"))) && (getenv("http_proxy")))
+          {
+             ecore_con_url_proxy_set(target, getenv("http_proxy"));
+          }
+        else if ((!strncmp(url, "https://", strlen("https://"))) && (getenv("https_proxy")))
+          {
+             ecore_con_url_proxy_set(target, getenv("https_proxy"));
+          }
+        else if ((!strncmp(url, "ftp://", strlen("ftp://"))) && (getenv("ftp_proxy")))
+          {
+             ecore_con_url_proxy_set(target, getenv("ftp_proxy"));
+          }
+        //
      }
 
    r = malloc(sizeof (Elm_Url));