aboutsummaryrefslogtreecommitdiff
path: root/tests/curl_test_data.py
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-03-10 17:47:44 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-03-13 11:03:42 +0100
commitfe8ba51209959c6ff200b4f7c847c7a3fc53ecfa (patch)
tree4e61ae8c2f06a8537017528b1002aadddee358dd /tests/curl_test_data.py
parenta7e24c736267d0cbf9ab2eedf2027b7d26e317bb (diff)
server/getpart: make the "XML-parser" stricter
When extracting a <section> <part> and there's no </part> before </section>, this now outputs an error and returns a wrong string to make users spot the mistake. Ref: #5070 Closes #5071
Diffstat (limited to 'tests/curl_test_data.py')
-rwxr-xr-xtests/curl_test_data.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/curl_test_data.py b/tests/curl_test_data.py
index 21747407d..f5ce533da 100755
--- a/tests/curl_test_data.py
+++ b/tests/curl_test_data.py
@@ -1,12 +1,12 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-#
+# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2017 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -30,7 +30,7 @@ import logging
log = logging.getLogger(__name__)
-REPLY_DATA = re.compile("<reply>\s*<data>(.*?)</data>", re.MULTILINE | re.DOTALL)
+REPLY_DATA = re.compile("<reply>[ \t\n\r]*<data[^<]*>(.*?)</data>", re.MULTILINE | re.DOTALL)
class TestData(object):