diff --git a/gabbi/handlers.py b/gabbi/handlers.py
index 33a4175..6de7f5b 100644
--- a/gabbi/handlers.py
+++ b/gabbi/handlers.py
@@ -128,6 +128,8 @@ class HeadersResponseHandler(ResponseHandler):
 
     If a header value is wrapped in ``/`` it is treated as a raw
     regular expression.
+
+    Headers values are always treated as strings.
     """
 
     test_key_suffix = 'headers'
@@ -137,10 +139,10 @@ class HeadersResponseHandler(ResponseHandler):
         header = header.lower()  # case-insensitive comparison
 
         response = test.response
-        header_value = test.replace_template(value)
+        header_value = test.replace_template(str(value))
 
         try:
-            response_value = response[header]
+            response_value = str(response[header])
         except KeyError:
             raise AssertionError(
                 "'%s' header not present in response: %s" % (
@@ -153,6 +155,6 @@ class HeadersResponseHandler(ResponseHandler):
                 'Expect header %s to match /%s/, got %s' %
                 (header, header_value, response_value))
         else:
-            test.assertEqual(header_value, response[header],
+            test.assertEqual(header_value, response_value,
                              'Expect header %s with value %s, got %s' %
                              (header, header_value, response[header]))

If the test value for a response header is not treated by yaml as a string there is an error
```
File "/Users/cdent/src/enamel/.tox/functional/lib/python2.7/site-packages/gabbi/handlers.py", line 149, in action
        if header_value.startswith('/') and header_value.endswith('/'):
    AttributeError: 'float' object has no attribute 'startswith'
```

when:

```yaml
    - name: default version
      desc: no header sent
      GET: /
      request_headers:
        content-type: application/json
      response_headers:
        vary: /openstack-enamel-api-version/
        openstack-enamel-api-version: 0.1
```
diff --git a/gabbi/tests/test_handlers.py b/gabbi/tests/test_handlers.py
index a92d53e..d5688b8 100644
--- a/gabbi/tests/test_handlers.py
+++ b/gabbi/tests/test_handlers.py
@@ -173,6 +173,17 @@ class HandlersTest(unittest.TestCase):
         self.assertIn("'location' header not present in response:",
                       str(failure.exception))
 
+    def test_resonse_headers_stringify(self):
+        handler = handlers.HeadersResponseHandler(self.test_class)
+        self.test.test_data = {'response_headers': {
+            'x-alpha-beta': 2.0,
+        }}
+        self.test.response = {'x-alpha-beta': '2.0'}
+        self._assert_handler(handler)
+
+        self.test.response = {'x-alpha-beta': 2.0}
+        self._assert_handler(handler)
+
     def _assert_handler(self, handler):
         # Instantiate our contained test class by naming its test
         # method and then run its tests to confirm.

pip install -e .[dev]
parse_log_pytest
requirements.txt
mock testrepository coverage hacking sphinx pytest
apt-get update apt-get install -y gcc
3.5
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.13
attrs==22.2.0
Babel==2.11.0
certifi==2021.5.30
charset-normalizer==2.0.12
colorama==0.4.5
coverage==6.2
decorator==5.1.1
docutils==0.18.1
extras==1.0.0
fixtures==4.0.1
flake8==3.8.4
-e git+https://github.com/cdent/gabbi.git@040821d39bd4fa067ea947bbf37687f76f4f325b#egg=gabbi
hacking==4.1.0
httplib2==0.22.0
idna==3.10
imagesize==1.4.1
importlib-metadata==4.8.3
iniconfig==1.1.1
iso8601==1.1.0
Jinja2==3.0.3
jsonpath-rw==1.4.0
jsonpath-rw-ext==1.2.2
MarkupSafe==2.0.1
mccabe==0.6.1
mock==5.2.0
packaging==21.3
pbr==6.1.1
pluggy==1.0.0
ply==3.11
py==1.11.0
pycodestyle==2.6.0
pyflakes==2.2.0
Pygments==2.14.0
pyparsing==3.1.4
pytest==7.0.1
python-subunit==1.4.2
pytz==2025.2
PyYAML==6.0.1
requests==2.27.1
six==1.17.0
snowballstemmer==2.2.0
Sphinx==5.3.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
testrepository==0.0.21
testtools==2.6.0
tomli==1.2.3
typing_extensions==4.1.1
urllib3==1.26.20
wsgi_intercept==1.13.1
zipp==3.6.0

name: gabbi
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=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - 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=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.13
      - attrs==22.2.0
      - babel==2.11.0
      - charset-normalizer==2.0.12
      - colorama==0.4.5
      - coverage==6.2
      - decorator==5.1.1
      - docutils==0.18.1
      - extras==1.0.0
      - fixtures==4.0.1
      - flake8==3.8.4
      - hacking==4.1.0
      - httplib2==0.22.0
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - iso8601==1.1.0
      - jinja2==3.0.3
      - jsonpath-rw==1.4.0
      - jsonpath-rw-ext==1.2.2
      - markupsafe==2.0.1
      - mccabe==0.6.1
      - mock==5.2.0
      - packaging==21.3
      - pbr==6.1.1
      - pluggy==1.0.0
      - ply==3.11
      - py==1.11.0
      - pycodestyle==2.6.0
      - pyflakes==2.2.0
      - pygments==2.14.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - python-subunit==1.4.2
      - pytz==2025.2
      - pyyaml==6.0.1
      - requests==2.27.1
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==5.3.0
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - testrepository==0.0.21
      - testtools==2.6.0
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - wsgi-intercept==1.13.1
      - zipp==3.6.0
prefix: /opt/conda/envs/gabbi

gabbi/tests/test_handlers.py::HandlersTest::test_resonse_headers_stringify
gabbi/tests/test_handlers.py::HandlersTest::test_response_headers gabbi/tests/test_handlers.py::HandlersTest::test_response_headers_fail_data gabbi/tests/test_handlers.py::HandlersTest::test_response_headers_fail_header gabbi/tests/test_handlers.py::HandlersTest::test_response_headers_regex gabbi/tests/test_handlers.py::HandlersTest::test_response_json_paths gabbi/tests/test_handlers.py::HandlersTest::test_response_json_paths_fail_data gabbi/tests/test_handlers.py::HandlersTest::test_response_json_paths_fail_path gabbi/tests/test_handlers.py::HandlersTest::test_response_strings gabbi/tests/test_handlers.py::HandlersTest::test_response_strings_fail gabbi/tests/test_handlers.py::HandlersTest::test_response_strings_fail_big_output gabbi/tests/test_handlers.py::HandlersTest::test_response_strings_fail_big_payload
gabbi/handlers.py
gabbi/handlers.py