diff --git a/asks/request.py b/asks/request.py
index 8361383..c1cfe6c 100644
--- a/asks/request.py
+++ b/asks/request.py
@@ -544,13 +544,20 @@ class Request:
                 except (KeyError, AttributeError):
                     resp_data['headers']['set-cookie'] = [str(header[1],
                                                           'utf-8')]
+
+        # check whether we should receive body according to RFC 7230
+        # https://tools.ietf.org/html/rfc7230#section-3.3.3
         get_body = False
         try:
             if int(resp_data['headers']['content-length']) > 0:
                 get_body = True
         except KeyError:
-            if resp_data['headers']['transfer-encoding'] == 'chunked':
-                get_body = True
+            try:
+                if resp_data['headers']['transfer-encoding'] == 'chunked':
+                    get_body = True
+            except KeyError:
+                if resp_data['headers']['connection'] == 'close':
+                    get_body = True
 
         if get_body:
             if self.callback is not None:

KeyError: 'transfer-encoding'
```
Traceback (most recent call last):
  File "/home/laura/.local/share/virtualenvs/automoderator-nZfczLQS/lib/python3.6/site-packages/asks/request.py", line 549, in _catch_response
    if int(resp_data['headers']['content-length']) > 0:
  File "/home/laura/.local/share/virtualenvs/automoderator-nZfczLQS/lib/python3.6/site-packages/asks/req_structs.py", line 79, in __getitem__
    return self._store[key.lower()][1]
KeyError: 'content-length'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/laura/.local/share/virtualenvs/automoderator-nZfczLQS/lib/python3.6/site-packages/curio/kernel.py", line 826, in _run_coro
    trap = current._send(current.next_value)
  File "/home/laura/.local/share/virtualenvs/automoderator-nZfczLQS/lib/python3.6/site-packages/curio/task.py", line 96, in _task_runner
    return await coro
  File "/home/laura/dev/discord/automoderator/automoderator/core/engine.py", line 133, in _handle_rule
    await fn(ctx, **kwargs)
  File "/home/laura/dev/discord/automoderator/automoderator/core/engine.py", line 175, in action_delete_message
    await msg.delete()
  File "/home/laura/.local/share/virtualenvs/automoderator-nZfczLQS/lib/python3.6/site-packages/curious/dataclasses/message.py", line 231, in delete
    await self._bot.http.delete_message(self.channel.id, self.id)
  File "/home/laura/.local/share/virtualenvs/automoderator-nZfczLQS/lib/python3.6/site-packages/curious/http/httpclient.py", line 596, in delete_message
    data = await self.delete(url, "messages:{}".format(channel_id))
  File "/home/laura/.local/share/virtualenvs/automoderator-nZfczLQS/lib/python3.6/site-packages/curious/http/httpclient.py", line 378, in delete
    return await self.request(("DELETE", bucket), method="DELETE", path=url, *args, **kwargs)
  File "/home/laura/.local/share/virtualenvs/automoderator-nZfczLQS/lib/python3.6/site-packages/curious/http/httpclient.py", line 251, in request
    response = await self._make_request(*args, **kwargs)
  File "/home/laura/.local/share/virtualenvs/automoderator-nZfczLQS/lib/python3.6/site-packages/curious/http/httpclient.py", line 212, in _make_request
    return await self.session.request(*args, headers=headers, **kwargs)
  File "/home/laura/.local/share/virtualenvs/automoderator-nZfczLQS/lib/python3.6/site-packages/asks/sessions.py", line 156, in request
    sock, r = await req_obj.make_request()
  File "/home/laura/.local/share/virtualenvs/automoderator-nZfczLQS/lib/python3.6/site-packages/asks/request.py", line 203, in make_request
    response_obj = await self._request_io(req, req_body, hconnection)
  File "/home/laura/.local/share/virtualenvs/automoderator-nZfczLQS/lib/python3.6/site-packages/asks/request.py", line 240, in _request_io
    response_obj = await self._catch_response(hconnection)
  File "/home/laura/.local/share/virtualenvs/automoderator-nZfczLQS/lib/python3.6/site-packages/asks/request.py", line 553, in _catch_response
    if resp_data['headers']['transfer-encoding'] == 'chunked':
  File "/home/laura/.local/share/virtualenvs/automoderator-nZfczLQS/lib/python3.6/site-packages/asks/req_structs.py", line 79, in __getitem__
    return self._store[key.lower()][1]
KeyError: 'transfer-encoding'
```

Errors when a HTTP server sends neither a Content-Length nor a Transfer-Encoding.
diff --git a/tests/test_asks_curio.py b/tests/test_asks_curio.py
index f255e48..b504c38 100644
--- a/tests/test_asks_curio.py
+++ b/tests/test_asks_curio.py
@@ -190,6 +190,13 @@ async def test_stream():
     assert len(img) == 8090
 
 
+# Test connection close without content-length and transfer-encoding
+@curio_run
+async def test_connection_close():
+    r = await asks.get('https://www.ua-region.com.ua/search/?q=rrr')
+    assert r.text
+
+
 # Test callback
 callback_data = b''
 async def callback_example(chunk):
diff --git a/tests/test_asks_trio.py b/tests/test_asks_trio.py
index 8a87bd8..322edd3 100644
--- a/tests/test_asks_trio.py
+++ b/tests/test_asks_trio.py
@@ -193,6 +193,13 @@ async def test_stream():
     assert len(img) == 8090
 
 
+# Test connection close without content-length and transfer-encoding
+@trio_run
+async def test_connection_close():
+    r = await asks.get('https://www.ua-region.com.ua/search/?q=rrr')
+    assert r.text
+
+
 # Test callback
 callback_data = b''
 async def callback_example(chunk):

pip install -e .
parse_log_pytest
pytest pylint git+https://github.com/python-trio/trio.git git+https://github.com/dabeaz/curio.git
apt-get update apt-get install -y gcc
3.9
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
-e git+https://github.com/theelous3/asks.git@e4a5b42a0f02002fc18dc60c09761a3922521de3#egg=asks
astroid==3.3.9
attrs==25.3.0
curio @ git+https://github.com/dabeaz/curio.git@148454621f9bd8dd843f591e87715415431f6979
dill==0.3.9
exceptiongroup==1.2.2
h11==0.14.0
idna==3.10
iniconfig==2.1.0
isort==6.0.1
mccabe==0.7.0
outcome==1.3.0.post0
packaging==24.2
platformdirs==4.3.7
pluggy==1.5.0
pylint==3.3.6
pytest==8.3.5
sniffio==1.3.1
sortedcontainers==2.4.0
tomli==2.2.1
tomlkit==0.13.2
trio @ git+https://github.com/python-trio/trio.git@d6c4cae0e4405fc96c507bcd73e365e890c25732
typing_extensions==4.13.0

name: asks
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - astroid==3.3.9
      - attrs==25.3.0
      - curio==1.6
      - dill==0.3.9
      - exceptiongroup==1.2.2
      - h11==0.14.0
      - idna==3.10
      - iniconfig==2.1.0
      - isort==6.0.1
      - mccabe==0.7.0
      - outcome==1.3.0.post0
      - packaging==24.2
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - pylint==3.3.6
      - pytest==8.3.5
      - sniffio==1.3.1
      - sortedcontainers==2.4.0
      - tomli==2.2.1
      - tomlkit==0.13.2
      - trio==0.29.0+dev
      - typing-extensions==4.13.0
prefix: /opt/conda/envs/asks

tests/test_asks_curio.py::test_connection_close tests/test_asks_trio.py::test_connection_close
tests/test_asks_trio.py::test_http_timeout_error tests/test_asks_trio.py::test_http_timeout tests/test_asks_trio.py::test_hsession_smallpool tests/test_asks_trio.py::test_session_stateful tests/test_asks_trio.py::test_session_stateful_double tests/test_asks_trio.py::test_Session_smallpool
tests/test_asks_curio.py::test_https_get tests/test_asks_curio.py::test_bad_www_and_schema_get tests/test_asks_curio.py::test_https_get_alt tests/test_asks_curio.py::test_http_get tests/test_asks_curio.py::test_http_redirect tests/test_asks_curio.py::test_http_max_redirect_error tests/test_asks_curio.py::test_http_max_redirect tests/test_asks_curio.py::test_http_timeout_error tests/test_asks_curio.py::test_http_timeout tests/test_asks_curio.py::test_param_dict_set tests/test_asks_curio.py::test_data_dict_set tests/test_asks_curio.py::test_cookie_dict_send tests/test_asks_curio.py::test_header_set tests/test_asks_curio.py::test_file_send_single tests/test_asks_curio.py::test_file_send_double tests/test_asks_curio.py::test_file_and_data_send tests/test_asks_curio.py::test_json_send tests/test_asks_curio.py::test_gzip tests/test_asks_curio.py::test_deflate tests/test_asks_curio.py::test_chunked_te tests/test_asks_curio.py::test_stream tests/test_asks_curio.py::test_callback tests/test_asks_curio.py::test_hsession_smallpool tests/test_asks_curio.py::test_session_stateful tests/test_asks_curio.py::test_session_stateful_double tests/test_asks_curio.py::test_Session_smallpool tests/test_asks_trio.py::test_https_get tests/test_asks_trio.py::test_bad_www_and_schema_get tests/test_asks_trio.py::test_https_get_alt tests/test_asks_trio.py::test_http_get tests/test_asks_trio.py::test_http_redirect tests/test_asks_trio.py::test_http_max_redirect_error tests/test_asks_trio.py::test_http_max_redirect tests/test_asks_trio.py::test_param_dict_set tests/test_asks_trio.py::test_data_dict_set tests/test_asks_trio.py::test_cookie_dict_send tests/test_asks_trio.py::test_header_set tests/test_asks_trio.py::test_file_send_single tests/test_asks_trio.py::test_file_send_double tests/test_asks_trio.py::test_file_and_data_send tests/test_asks_trio.py::test_json_send tests/test_asks_trio.py::test_gzip tests/test_asks_trio.py::test_deflate tests/test_asks_trio.py::test_chunked_te tests/test_asks_trio.py::test_stream tests/test_asks_trio.py::test_callback
asks/request.py
asks/request.py