Skip to content

Commit 1adf577

Browse files
committed
Add HTTP server parameter tests containing & and =
1 parent 8c0b011 commit 1adf577

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/device/test_http_server/test_http_server.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ TEST_CASE("HTTP GET Parameters", "[HTTPServer]")
4545
uint32_t startTime = millis();
4646
while(siteHits == 0 && (millis() - startTime) < 10000)
4747
server.handleClient();
48-
REQUIRE(siteHits > 0 && siteData.equals("var1 = val with spaces\nvar+ = some%"));
48+
REQUIRE(siteHits > 0 && siteData.equals("var1 = val with spaces\nva=r+ = so&me%"));
4949
}
5050
}
5151

@@ -87,7 +87,7 @@ TEST_CASE("HTTP GET+POST Parameters", "[HTTPServer]")
8787
uint32_t startTime = millis();
8888
while(siteHits == 0 && (millis() - startTime) < 10000)
8989
server.handleClient();
90-
REQUIRE(siteHits > 0 && siteData.equals("var3 = val with spaces\nvar+ = some%"));
90+
REQUIRE(siteHits > 0 && siteData.equals("var3 = val with spaces\nva&r+ = so=me%"));
9191
}
9292
}
9393

tests/device/test_http_server/test_http_server.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def http_test(res, url, get=None, post=None):
2424
@setup('HTTP GET Parameters')
2525
def setup_http_get_params(e):
2626
def testRun():
27-
return http_test('var1 = val with spaces\nvar+ = some%', 'http://etd.local/get', {'var1' : 'val with spaces', 'var+' : 'some%'})
27+
return http_test('var1 = val with spaces\nva=r+ = so&me%', 'http://etd.local/get', {'var1' : 'val with spaces', 'va=r+' : 'so&me%'})
2828
Thread(target=testRun).start()
2929

3030
@teardown('HTTP GET Parameters')
@@ -44,7 +44,7 @@ def teardown_http_post_params(e):
4444
@setup('HTTP GET+POST Parameters')
4545
def setup_http_getpost_params(e):
4646
def testRun():
47-
return http_test('var3 = val with spaces\nvar+ = some%', 'http://etd.local/get_and_post', {'var3' : 'val with spaces'}, {'var+' : 'some%'})
47+
return http_test('var3 = val with spaces\nva&r+ = so=me%', 'http://etd.local/get_and_post', {'var3' : 'val with spaces'}, {'va&r+' : 'so=me%'})
4848
Thread(target=testRun).start()
4949

5050
@teardown('HTTP GET+POST Parameters')

0 commit comments

Comments
 (0)