Repository: slackapi/python-slack-sdk (python)

Issue:
"urlopen error no host given" occurred by referring to an empty proxy env params
### Reproducible in:
There sets empty HTTP_PROXY environment param at first.
```
export HTTP_PROXY=""
```

```
import logging, os

logging.basicConfig(level=logging.DEBUG)

from slack_sdk import WebClient

proxy_url = (
    os.environ.get("HTTPS_PROXY")
    or os.environ.get("https_proxy")
    or os.environ.get("HTTP_PROXY")
    or os.environ.get("http_proxy")
)

print(proxy_url)  # this param is void ("") but it's available

client = WebClient(os.environ["SLACK_BOT_TOKEN"])

response = client.chat_postMessage(channel="#randam", text="hello",)
```

#### The Slack SDK version

slack-sdk==3.8.0
slackbot==1.0.0
slackdown==0.0.3
slacker==0.14.0

#### Python runtime version

Python 3.8.10

#### OS info

WSL2 (Ubuntu 20.04) on Windows10

#### Steps to reproduce:

running sample code

### Expected result:

If proxies on environment params are empty, I'd like to let these params ignore.

### Actual result:

There below behavior has occurred.

> ERROR:slack_sdk.web.base_client:Failed to send a request to Slack API server: <urlopen error no host given>

### Requirements

I would like you to merge below patch.

```
diff --git a/slack_sdk/proxy_env_variable_loader.py b/slack_sdk/proxy_env_variable_loader.py
index 398bef1..b17219e 100644
--- a/slack_sdk/proxy_env_variable_loader.py
+++ b/slack_sdk/proxy_env_variable_loader.py
@@ -13,8 +13,10 @@ def load_http_proxy_from_env(logger: logging.Logger = _default_logger) -> Option
         or os.environ.get("HTTP_PROXY")
         or os.environ.get("http_proxy")
     )
-    if proxy_url is not None:
+    if (proxy_url is not None) and (proxy_url != ""):
         logger.debug(
             f"HTTP proxy URL has been loaded from an env variable: {proxy_url}"
         )
+    else:
+        proxy_url = None
     return proxy_url
```

Pull request description:
Fix #1082 by ignoring proxy parameter if env parameter is set but empty
## Summary

Fix #1082

### Category (place an `x` in each of the `[ ]`)

- [x] **slack_sdk.web.WebClient (sync/async)** (Web API client)
- [ ] **slack_sdk.webhook.WebhookClient (sync/async)** (Incoming Webhook, response_url sender)
- [ ] **slack_sdk.socket_mode** (Socket Mode client)
- [ ] **slack_sdk.signature** (Request Signature Verifier)
- [ ] **slack_sdk.oauth** (OAuth Flow Utilities)
- [ ] **slack_sdk.models** (UI component builders)
- [ ] **slack_sdk.scim** (SCIM API client)
- [ ] **slack_sdk.audit_logs** (Audit Logs API client)
- [ ] **slack_sdk.rtm_v2** (RTM client)
- [ ] `/docs-src` (Documents, have you run `./docs.sh`?)
- [ ] `/docs-src-v2` (Documents, have you run `./docs-v2.sh`?)
- [ ] `/tutorial` (PythOnBoardingBot tutorial)
- [ ] `tests`/`integration_tests` (Automated tests for this library)

## Requirements (place an `x` in each `[ ]`)

- [x] I've read and understood the [Contributing Guidelines](https://github.com/slackapi/python-slack-sdk/blob/main/.github/contributing.md) and have done my best effort to follow them.
- [x] I've read and agree to the [Code of Conduct](https://slackhq.github.io/code-of-conduct).
- [x] I've run `python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh` after making the changes.


Patch:
diff --git a/slack_sdk/proxy_env_variable_loader.py b/slack_sdk/proxy_env_variable_loader.py
index 398bef1..af23449 100644
--- a/slack_sdk/proxy_env_variable_loader.py
+++ b/slack_sdk/proxy_env_variable_loader.py
@@ -13,8 +13,14 @@ def load_http_proxy_from_env(logger: logging.Logger = _default_logger) -> Option
         or os.environ.get("HTTP_PROXY")
         or os.environ.get("http_proxy")
     )
-    if proxy_url is not None:
+    if proxy_url is None:
+        return None
+    if len(proxy_url.strip()) == 0:
+        # If the value is an empty string, the intention should be unsetting it
         logger.debug(
-            f"HTTP proxy URL has been loaded from an env variable: {proxy_url}"
+            "The Slack SDK ignored the proxy env variable as an empty value is set."
         )
+        return None
+
+    logger.debug(f"HTTP proxy URL has been loaded from an env variable: {proxy_url}")
     return proxy_url


Test patch:
diff --git a/tests/test_proxy_env_variable_loader.py b/tests/test_proxy_env_variable_loader.py
index d5e12a4..3e9681f 100644
--- a/tests/test_proxy_env_variable_loader.py
+++ b/tests/test_proxy_env_variable_loader.py
@@ -22,3 +22,19 @@ class TestProxyEnvVariableLoader(unittest.TestCase):
         os.environ["HTTPS_PROXY"] = "http://localhost:9999"
         url = load_http_proxy_from_env()
         self.assertEqual(url, "http://localhost:9999")
+
+    def test_load_all_empty_case(self):
+        os.environ["HTTP_PROXY"] = ""
+        os.environ["http_proxy"] = ""
+        os.environ["HTTPS_PROXY"] = ""
+        os.environ["https_proxy"] = ""
+        url = load_http_proxy_from_env()
+        self.assertEqual(url, None)
+
+    def test_proxy_url_is_none_case(self):
+        os.environ.pop("HTTPS_PROXY", None)
+        os.environ.pop("https_proxy", None)
+        os.environ.pop("HTTP_PROXY", None)
+        os.environ.pop("http_proxy", None)
+        url = load_http_proxy_from_env()
+        self.assertEqual(url, None)