diff --git a/gabbi/case.py b/gabbi/case.py
index 50b8815..2be6949 100644
--- a/gabbi/case.py
+++ b/gabbi/case.py
@@ -153,7 +153,7 @@ class HTTPTestCase(testcase.TestCase):
 
     def _environ_replace(self, message):
         """Replace an indicator in a message with the environment value."""
-        value = re.sub(r"\$ENVIRON\['([^']+)'\]",
+        value = re.sub(self._replacer_regex('ENVIRON'),
                        self._environ_replacer, message)
         if value == "False":
             return False
@@ -167,7 +167,7 @@ class HTTPTestCase(testcase.TestCase):
 
         Let KeyError raise if variable not present.
         """
-        environ_name = match.group(1)
+        environ_name = match.group('arg')
         return os.environ[environ_name]
 
     @staticmethod
@@ -188,17 +188,17 @@ class HTTPTestCase(testcase.TestCase):
         """Replace a header indicator in a message with that headers value from
         the prior request.
         """
-        return re.sub(r"\$HEADERS\['([^']+)'\]",
+        return re.sub(self._replacer_regex('HEADERS'),
                       self._header_replacer, message)
 
     def _header_replacer(self, match):
         """Replace a regex match with the value of a prior header."""
-        header_key = match.group(1)
+        header_key = match.group('arg')
         return self.prior.response[header_key.lower()]
 
     def _json_replacer(self, match):
         """Replace a regex match with the value of a JSON Path."""
-        path = match.group(1)
+        path = match.group('arg')
         return str(self.extract_json_path_value(self.prior.json_data, path))
 
     def _location_replace(self, message):
@@ -253,9 +253,14 @@ class HTTPTestCase(testcase.TestCase):
 
         return full_url
 
+    @staticmethod
+    def _replacer_regex(key):
+        message = r"\$%s\[(?P<quote>['\"])(?P<arg>.+?)(?P=quote)\]" % key
+        return message
+
     def _response_replace(self, message):
         """Replace a JSON Path from the prior request with a value."""
-        return re.sub(r"\$RESPONSE\['([^']+)'\]",
+        return re.sub(self._replacer_regex('RESPONSE'),
                       self._json_replacer, message)
 
     def _run_request(self, url, method, headers, body):
diff --git a/gabbi/gabbits_intercept/backref.yaml b/gabbi/gabbits_intercept/backref.yaml
index 4ae1168..e0cec5b 100644
--- a/gabbi/gabbits_intercept/backref.yaml
+++ b/gabbi/gabbits_intercept/backref.yaml
@@ -16,7 +16,7 @@ tests:
       location: $SCHEME://$NETLOC/posterchild
 
 - name: post some more json
-  url: $RESPONSE['link']
+  url: $RESPONSE["link"]
   request_headers:
       content-type: application/json
   method: POST
@@ -26,7 +26,7 @@ tests:
      d:
        z: $RESPONSE['b']
   response_json_paths:
-     a: $RESPONSE['a']
+     a: $RESPONSE["a"]
      c: /v2
      d:
        z: $RESPONSE['b']
@@ -48,3 +48,19 @@ tests:
      location: $SCHEME://$NETLOC$RESPONSE['c']
      x-gabbi-url: $SCHEME://$NETLOC/v2
      content-type: $HEADERS['content-type']
+
+- name: post even more json quote different
+  url: $RESPONSE["c"]
+  request_headers:
+      content-type: application/json
+  method: POST
+  data: |
+      {"a": "$RESPONSE["a"]",
+       "c": "$RESPONSE["c"]"}
+  response_strings:
+      - '"a": "$RESPONSE["a"]"'
+      - '"c": "/v2"'
+  response_headers:
+     location: $SCHEME://$NETLOC$RESPONSE['c']
+     x-gabbi-url: $SCHEME://$NETLOC/v2
+     content-type: $HEADERS['content-type']
diff --git a/gabbi/handlers.py b/gabbi/handlers.py
index d39a987..f754d94 100644
--- a/gabbi/handlers.py
+++ b/gabbi/handlers.py
@@ -120,8 +120,6 @@ class HeadersResponseHandler(ResponseHandler):
     test_key_value = {}
 
     def action(self, test, header, value):
-        header = header.lower()  # case-insensitive comparison
-
         response = test.response
         header_value = test.replace_template(value)
 
diff --git a/gabbi/reporter.py b/gabbi/reporter.py
index 9776b80..0479588 100644
--- a/gabbi/reporter.py
+++ b/gabbi/reporter.py
@@ -81,7 +81,7 @@ class ConciseTestResult(TextTestResult):
             details = details.strip().splitlines()[-1]  # traceback's last line
             if ':' in details:
                 details = details.split(':', 1)[1]  # discard exception name
-            self.stream.writeln('\t%s' % details.strip())
+            self.stream.writeln('\t%s' % details)
 
 
 class ConciseTestRunner(TextTestRunner):

magical variables enforce single quotes
One of my tests contained the following line:

```yaml
url: $RESPONSE["$._links.next"]
```

That refused to work - it took me quite a while to figure out that's because gabbi seems to only accept single quotes there, as this worked just fine.

```yaml
url: $RESPONSE['$._links.next']
```

I would argue that users' expectation is that single and double quotes are equivalent.

diff --git a/gabbi/tests/test_handlers.py b/gabbi/tests/test_handlers.py
index b647e80..b18e8ec 100644
--- a/gabbi/tests/test_handlers.py
+++ b/gabbi/tests/test_handlers.py
@@ -94,16 +94,10 @@ class HandlersTest(unittest.TestCase):
 
     def test_response_headers(self):
         handler = handlers.HeadersResponseHandler(self.test_class)
-        self.test.response = {'content-type': 'text/plain'}
-
         self.test.test_data = {'response_headers': {
             'content-type': 'text/plain',
         }}
-        self._assert_handler(handler)
-
-        self.test.test_data = {'response_headers': {
-            'Content-Type': 'text/plain',
-        }}
+        self.test.response = {'content-type': 'text/plain'}
         self._assert_handler(handler)
 
     def test_response_headers_regex(self):
diff --git a/gabbi/tests/test_replacers.py b/gabbi/tests/test_replacers.py
index f32fe01..11628c1 100644
--- a/gabbi/tests/test_replacers.py
+++ b/gabbi/tests/test_replacers.py
@@ -44,3 +44,8 @@ class EnvironReplaceTest(testtools.TestCase):
 
         os.environ['moo'] = "cow"
         self.assertEqual("cow", http_case._environ_replace(message))
+
+        message = '$ENVIRON["moo"]'
+
+        os.environ['moo'] = "True"
+        self.assertEqual(True, http_case._environ_replace(message))

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio subunit
apt-get update apt-get install -y gcc
3.9
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
coverage==7.8.0
decorator==5.2.1
exceptiongroup==1.2.2
execnet==2.1.1
extras==1.0.0
-e git+https://github.com/cdent/gabbi.git@ad9c7d1743576979ae96a74469937afcb980b5af#egg=gabbi
httplib2==0.22.0
iniconfig==2.1.0
jsonpath-rw==1.4.0
packaging==24.2
pbr==6.1.1
pluggy==1.5.0
ply==3.11
pyparsing==3.2.3
pytest==8.3.5
pytest-asyncio==0.26.0
pytest-cov==6.0.0
pytest-mock==3.14.0
pytest-xdist==3.6.1
PyYAML==6.0.2
six==1.17.0
subunit==0.0.0a0
testtools==2.7.2
tomli==2.2.1
typing_extensions==4.13.0
wsgi_intercept==1.13.1

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
  - 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:
      - coverage==7.8.0
      - decorator==5.2.1
      - exceptiongroup==1.2.2
      - execnet==2.1.1
      - extras==1.0.0
      - httplib2==0.22.0
      - iniconfig==2.1.0
      - jsonpath-rw==1.4.0
      - packaging==24.2
      - pbr==6.1.1
      - pluggy==1.5.0
      - ply==3.11
      - pyparsing==3.2.3
      - pytest==8.3.5
      - pytest-asyncio==0.26.0
      - pytest-cov==6.0.0
      - pytest-mock==3.14.0
      - pytest-xdist==3.6.1
      - pyyaml==6.0.2
      - six==1.17.0
      - subunit==0.0.0a0
      - testtools==2.7.2
      - tomli==2.2.1
      - typing-extensions==4.13.0
      - wsgi-intercept==1.13.1
prefix: /opt/conda/envs/gabbi

gabbi/tests/test_replacers.py::EnvironReplaceTest::test_environ_boolean
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/case.py gabbi/gabbits_intercept/backref.yaml gabbi/reporter.py gabbi/handlers.py
gabbi/case.py gabbi/gabbits_intercept/backref.yaml gabbi/reporter.py gabbi/handlers.py