diff --git a/engineio/asyncio_client.py b/engineio/asyncio_client.py
index 5ee6f11..896e62f 100644
--- a/engineio/asyncio_client.py
+++ b/engineio/asyncio_client.py
@@ -249,7 +249,7 @@ class AsyncClient(client.Client):
         for header, value in headers.items():
             if header.lower() == 'cookie':
                 cookies = dict(
-                    [cookie.split('=') for cookie in value.split('; ')])
+                    [cookie.split('=', 1) for cookie in value.split('; ')])
                 del headers[header]
                 break
         self.http.cookie_jar.update_cookies(cookies)

Failing to parse cookie with an equal in its value
This line
https://github.com/miguelgrinberg/python-engineio/blob/7fa9575954f4e14794d5458107522d858c08f69e/engineio/asyncio_client.py#L252
causes a cookie with an equal in its value to throw an exception like
``ValueError: dictionary update sequence element #0 has length 3; 2 is required``

The fix for that could be:
```
[cookie.split('=', 1) for cookie in value.split('; ')])
```
diff --git a/tests/asyncio/test_asyncio_client.py b/tests/asyncio/test_asyncio_client.py
index e81235c..055c2d9 100644
--- a/tests/asyncio/test_asyncio_client.py
+++ b/tests/asyncio/test_asyncio_client.py
@@ -617,14 +617,16 @@ class TestAsyncClient(unittest.TestCase):
         on_connect = mock.MagicMock()
         c.on('connect', on_connect)
         _run(c.connect('ws://foo',
-                       headers={'Cookie': 'key=value; key2=value2'},
+                       headers={
+                           'Cookie': 'key=value; key2=value2; key3="value3="'
+                       },
                        transports=['websocket']))
         time.sleep(0.1)
         c.http.ws_connect.mock.assert_called_once_with(
             'ws://foo/engine.io/?transport=websocket&EIO=3&t=123.456',
             headers={})
         c.http.cookie_jar.update_cookies.assert_called_once_with(
-            {'key': 'value', 'key2': 'value2'})
+            {'key': 'value', 'key2': 'value2', 'key3': '"value3="'})
 
     @mock.patch('engineio.client.time.time', return_value=123.456)
     def test_websocket_connection_with_cookies_and_headers(self, _time):

pip install -e .[client,asyncio_client]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio
apt-get update apt-get install -y gcc
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
aiohappyeyeballs==2.6.1
aiohttp==3.11.14
aiosignal==1.3.2
async-timeout==5.0.1
attrs==25.3.0
certifi==2025.1.31
charset-normalizer==3.4.1
coverage==7.8.0
exceptiongroup==1.2.2
execnet==2.1.1
frozenlist==1.5.0
idna==3.10
iniconfig==2.1.0
multidict==6.2.0
packaging==24.2
pluggy==1.5.0
propcache==0.3.1
pytest==8.3.5
pytest-asyncio==0.26.0
pytest-cov==6.0.0
pytest-mock==3.14.0
pytest-xdist==3.6.1
-e git+https://github.com/miguelgrinberg/python-engineio.git@7fa9575954f4e14794d5458107522d858c08f69e#egg=python_engineio
requests==2.32.3
six==1.17.0
tomli==2.2.1
typing_extensions==4.13.0
urllib3==2.3.0
websocket-client==1.8.0
yarl==1.18.3

name: python-engineio
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:
      - aiohappyeyeballs==2.6.1
      - aiohttp==3.11.14
      - aiosignal==1.3.2
      - async-timeout==5.0.1
      - attrs==25.3.0
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - coverage==7.8.0
      - exceptiongroup==1.2.2
      - execnet==2.1.1
      - frozenlist==1.5.0
      - idna==3.10
      - iniconfig==2.1.0
      - multidict==6.2.0
      - packaging==24.2
      - pluggy==1.5.0
      - propcache==0.3.1
      - pytest==8.3.5
      - pytest-asyncio==0.26.0
      - pytest-cov==6.0.0
      - pytest-mock==3.14.0
      - pytest-xdist==3.6.1
      - requests==2.32.3
      - six==1.17.0
      - tomli==2.2.1
      - typing-extensions==4.13.0
      - urllib3==2.3.0
      - websocket-client==1.8.0
      - yarl==1.18.3
prefix: /opt/conda/envs/python-engineio

tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_websocket_connection_with_cookie_header
tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_background_tasks
tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_already_connected tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_connect_custom_headers tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_connect_polling tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_connect_query_string tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_connect_websocket tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_create_event tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_create_queue tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_disconnect_not_connected tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_disconnect_polling tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_disconnect_polling_abort tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_disconnect_websocket tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_disconnect_websocket_abort tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_invalid_transports tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_is_asyncio_based tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_ping_loop_disconnect tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_ping_loop_disconnected tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_ping_loop_missing_pong tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_ping_loop_missing_pong_websocket tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_polling_connection_404 tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_polling_connection_failed tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_polling_connection_invalid_packet tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_polling_connection_no_open_packet tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_polling_connection_not_upgraded tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_polling_connection_successful tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_polling_connection_upgraded tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_polling_connection_with_more_packets tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_polling_https_noverify_connection_successful tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_read_loop_polling tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_read_loop_polling_bad_packet tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_read_loop_polling_bad_status tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_read_loop_polling_disconnected tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_read_loop_polling_no_response tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_read_loop_websocket tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_read_loop_websocket_disconnected tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_read_loop_websocket_no_response tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_read_loop_websocket_unexpected_error tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_receive_close_packet tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_receive_message_packet tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_receive_noop_packet tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_receive_pong_packet tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_receive_unknown_packet tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_send tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_send_packet tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_send_packet_disconnected tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_sleep tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_some_invalid_transports tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_trigger_event_coroutine tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_trigger_event_coroutine_async tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_trigger_event_coroutine_async_error tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_trigger_event_coroutine_error tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_trigger_event_function tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_trigger_event_function_async tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_trigger_event_function_async_error tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_trigger_event_function_error tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_trigger_unknown_event tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_wait tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_wait_no_task tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_websocket_connection_failed tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_websocket_connection_no_open_packet tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_websocket_connection_successful tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_websocket_connection_with_cookies tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_websocket_connection_with_cookies_and_headers tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_websocket_https_noverify_connection_successful tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_websocket_upgrade_failed tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_websocket_upgrade_no_pong tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_websocket_upgrade_successful tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_write_loop_disconnected tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_write_loop_empty_queue tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_write_loop_no_packets tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_write_loop_polling_bad_connection tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_write_loop_polling_bad_status tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_write_loop_polling_one_packet tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_write_loop_polling_three_packets tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_write_loop_polling_two_packets_done tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_write_loop_websocket_bad_connection tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_write_loop_websocket_one_packet tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_write_loop_websocket_one_packet_binary tests/asyncio/test_asyncio_client.py::TestAsyncClient::test_write_loop_websocket_three_packets
engineio/asyncio_client.py
engineio/asyncio_client.py