diff --git a/.travis.yml b/.travis.yml
index 60f9f9b..43be62e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,7 +8,7 @@ python:
     - "3.7-dev"
 
 install:
-    - pip install -r requirements.txt
+    - pip install -U -r requirements.txt
 
 script:
     - scripts/test
diff --git a/uvicorn/protocols/http/httptools_impl.py b/uvicorn/protocols/http/httptools_impl.py
index 0b140b2..10af654 100644
--- a/uvicorn/protocols/http/httptools_impl.py
+++ b/uvicorn/protocols/http/httptools_impl.py
@@ -493,7 +493,10 @@ class RequestResponseCycle:
             if self.scope["method"] == "HEAD":
                 self.expected_content_length = 0
             elif self.chunked_encoding:
-                content = [b"%x\r\n" % len(body), body, b"\r\n"]
+                if body:
+                    content = [b"%x\r\n" % len(body), body, b"\r\n"]
+                else:
+                    content = []
                 if not more_body:
                     content.append(b"0\r\n\r\n")
                 self.transport.write(b"".join(content))

Extra chunk when body is empty
Using the example from the Readme, but returning an empty body:

```python
class App():

    def __init__(self, scope):
        assert scope['type'] == 'http'
        self.scope = scope

    async def __call__(self, receive, send):
        await send({
            'type': 'http.response.start',
            'status': 200,
            'headers': [
                [b'content-type', b'text/plain'],
            ],
        })
        await send({
            'type': 'http.response.body',
            'body': b'',  # <- This is the only change from the example
        })
```

Running:
```bash
uvicorn app:App
```

Curl says:
```bash
> curl http://127.0.0.1:8000 -v
* Rebuilt URL to: http://127.0.0.1:8000/
*   Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 8000 (#0)
> GET / HTTP/1.1
> Host: 127.0.0.1:8000
> User-Agent: curl/7.47.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< server: uvicorn
< date: Thu, 17 Jan 2019 15:11:08 GMT
< content-type: text/plain
< transfer-encoding: chunked
< 
* Leftovers after chunking: 5 bytes
* Connection #0 to host 127.0.0.1 left intact
```

It sounds like those 5 bytes shouldn't be there. I think it's sending an extra chunk: there should be only 1 chunk with size 0. Maybe it's easier to see with telnet:

```bash
> telnet 127.0.0.1 8000
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
GET / HTTP/1.1 

HTTP/1.1 200 OK
server: uvicorn
date: Thu, 17 Jan 2019 15:13:32 GMT
content-type: text/plain
transfer-encoding: chunked

0

0

```

I noticed it because it seems to break aiohttp's client. Any other UA seems to be happy with it.
Any status code is affected too, so 301/302 redirects are "always" affected for example. 
diff --git a/tests/protocols/test_http.py b/tests/protocols/test_http.py
index c1cd9dc..f1b3ca1 100644
--- a/tests/protocols/test_http.py
+++ b/tests/protocols/test_http.py
@@ -240,6 +240,35 @@ def test_chunked_encoding(protocol_cls):
     assert not protocol.transport.is_closing()
 
 
+@pytest.mark.parametrize("protocol_cls", [HttpToolsProtocol, H11Protocol])
+def test_chunked_encoding_empty_body(protocol_cls):
+    class App():
+        def __init__(self, scope):
+            assert scope['type'] == 'http'
+            self.scope = scope
+
+        async def __call__(self, receive, send):
+            await send({
+                'type': 'http.response.start',
+                'status': 200,
+                'headers': [
+                    [b'content-type', b'text/plain'],
+                ],
+            })
+            await send({
+                'type': 'http.response.body',
+                'body': b'',
+            })
+
+    protocol = get_connected_protocol(App, protocol_cls)
+    protocol.data_received(SIMPLE_GET_REQUEST)
+    protocol.loop.run_one()
+    assert b"HTTP/1.1 200 OK" in protocol.transport.buffer
+    print(protocol.transport.buffer)
+    assert protocol.transport.buffer.count(b'0\r\n\r\n') == 1
+    assert not protocol.transport.is_closing()
+
+
 @pytest.mark.parametrize("protocol_cls", [HttpToolsProtocol, H11Protocol])
 def test_pipelined_requests(protocol_cls):
     def app(scope):

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov coverage
apt-get update apt-get install -y gcc
3.7
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
certifi @ file:///croot/certifi_1671487769961/work/certifi
charset-normalizer==3.4.1
click==8.1.8
codecov==2.1.13
coverage==7.2.7
exceptiongroup==1.2.2
h11==0.14.0
httptools==0.6.0
idna==3.10
importlib-metadata==6.7.0
iniconfig==2.0.0
packaging==24.0
pluggy==1.2.0
pytest==7.4.4
pytest-cov==4.1.0
requests==2.31.0
tomli==2.0.1
typing_extensions==4.7.1
urllib3==2.0.7
-e git+https://github.com/encode/uvicorn.git@f6f173c16887b4fceeec8ebf62808ea7a6111472#egg=uvicorn
uvloop==0.18.0
websockets==11.0.3
wsproto==1.2.0
zipp==3.15.0

name: uvicorn
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
  - certifi=2022.12.7=py37h06a4308_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=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - charset-normalizer==3.4.1
      - click==8.1.8
      - codecov==2.1.13
      - coverage==7.2.7
      - exceptiongroup==1.2.2
      - h11==0.14.0
      - httptools==0.6.0
      - idna==3.10
      - importlib-metadata==6.7.0
      - iniconfig==2.0.0
      - packaging==24.0
      - pluggy==1.2.0
      - pytest==7.4.4
      - pytest-cov==4.1.0
      - requests==2.31.0
      - tomli==2.0.1
      - typing-extensions==4.7.1
      - urllib3==2.0.7
      - uvloop==0.18.0
      - websockets==11.0.3
      - wsproto==1.2.0
      - zipp==3.15.0
prefix: /opt/conda/envs/uvicorn

tests/protocols/test_http.py::test_chunked_encoding_empty_body[HttpToolsProtocol]
tests/protocols/test_http.py::test_supported_upgrade_request[HttpToolsProtocol] tests/protocols/test_http.py::test_supported_upgrade_request[H11Protocol]
tests/protocols/test_http.py::test_get_request[HttpToolsProtocol] tests/protocols/test_http.py::test_get_request[H11Protocol] tests/protocols/test_http.py::test_head_request[HttpToolsProtocol] tests/protocols/test_http.py::test_head_request[H11Protocol] tests/protocols/test_http.py::test_post_request[HttpToolsProtocol] tests/protocols/test_http.py::test_post_request[H11Protocol] tests/protocols/test_http.py::test_keepalive[HttpToolsProtocol] tests/protocols/test_http.py::test_keepalive[H11Protocol] tests/protocols/test_http.py::test_keepalive_timeout[HttpToolsProtocol] tests/protocols/test_http.py::test_keepalive_timeout[H11Protocol] tests/protocols/test_http.py::test_close[HttpToolsProtocol] tests/protocols/test_http.py::test_close[H11Protocol] tests/protocols/test_http.py::test_chunked_encoding[HttpToolsProtocol] tests/protocols/test_http.py::test_chunked_encoding[H11Protocol] tests/protocols/test_http.py::test_chunked_encoding_empty_body[H11Protocol] tests/protocols/test_http.py::test_pipelined_requests[HttpToolsProtocol] tests/protocols/test_http.py::test_pipelined_requests[H11Protocol] tests/protocols/test_http.py::test_undersized_request[HttpToolsProtocol] tests/protocols/test_http.py::test_undersized_request[H11Protocol] tests/protocols/test_http.py::test_oversized_request[HttpToolsProtocol] tests/protocols/test_http.py::test_oversized_request[H11Protocol] tests/protocols/test_http.py::test_large_post_request[HttpToolsProtocol] tests/protocols/test_http.py::test_large_post_request[H11Protocol] tests/protocols/test_http.py::test_invalid_http[HttpToolsProtocol] tests/protocols/test_http.py::test_invalid_http[H11Protocol] tests/protocols/test_http.py::test_app_exception[HttpToolsProtocol] tests/protocols/test_http.py::test_app_exception[H11Protocol] tests/protocols/test_http.py::test_app_init_exception[HttpToolsProtocol] tests/protocols/test_http.py::test_app_init_exception[H11Protocol] tests/protocols/test_http.py::test_exception_during_response[HttpToolsProtocol] tests/protocols/test_http.py::test_exception_during_response[H11Protocol] tests/protocols/test_http.py::test_no_response_returned[HttpToolsProtocol] tests/protocols/test_http.py::test_no_response_returned[H11Protocol] tests/protocols/test_http.py::test_partial_response_returned[HttpToolsProtocol] tests/protocols/test_http.py::test_partial_response_returned[H11Protocol] tests/protocols/test_http.py::test_duplicate_start_message[HttpToolsProtocol] tests/protocols/test_http.py::test_duplicate_start_message[H11Protocol] tests/protocols/test_http.py::test_missing_start_message[HttpToolsProtocol] tests/protocols/test_http.py::test_missing_start_message[H11Protocol] tests/protocols/test_http.py::test_message_after_body_complete[HttpToolsProtocol] tests/protocols/test_http.py::test_message_after_body_complete[H11Protocol] tests/protocols/test_http.py::test_value_returned[HttpToolsProtocol] tests/protocols/test_http.py::test_value_returned[H11Protocol] tests/protocols/test_http.py::test_early_disconnect[HttpToolsProtocol] tests/protocols/test_http.py::test_early_disconnect[H11Protocol] tests/protocols/test_http.py::test_early_response[HttpToolsProtocol] tests/protocols/test_http.py::test_early_response[H11Protocol] tests/protocols/test_http.py::test_read_after_response[HttpToolsProtocol] tests/protocols/test_http.py::test_read_after_response[H11Protocol] tests/protocols/test_http.py::test_http10_request[HttpToolsProtocol] tests/protocols/test_http.py::test_http10_request[H11Protocol] tests/protocols/test_http.py::test_root_path[HttpToolsProtocol] tests/protocols/test_http.py::test_root_path[H11Protocol] tests/protocols/test_http.py::test_max_concurrency[HttpToolsProtocol] tests/protocols/test_http.py::test_max_concurrency[H11Protocol] tests/protocols/test_http.py::test_shutdown_during_request[HttpToolsProtocol] tests/protocols/test_http.py::test_shutdown_during_request[H11Protocol] tests/protocols/test_http.py::test_shutdown_during_idle[HttpToolsProtocol] tests/protocols/test_http.py::test_shutdown_during_idle[H11Protocol] tests/protocols/test_http.py::test_100_continue_sent_when_body_consumed[HttpToolsProtocol] tests/protocols/test_http.py::test_100_continue_sent_when_body_consumed[H11Protocol] tests/protocols/test_http.py::test_100_continue_not_sent_when_body_not_consumed[HttpToolsProtocol] tests/protocols/test_http.py::test_100_continue_not_sent_when_body_not_consumed[H11Protocol] tests/protocols/test_http.py::test_unsupported_upgrade_request[HttpToolsProtocol] tests/protocols/test_http.py::test_unsupported_upgrade_request[H11Protocol]
uvicorn/protocols/http/httptools_impl.py .travis.yml
uvicorn/protocols/http/httptools_impl.py .travis.yml