diff --git a/test/tickets/LDEV3349.cfc b/test/tickets/LDEV3349.cfc
index 88d7dbf5a5..38ce711483 100644
--- a/test/tickets/LDEV3349.cfc
+++ b/test/tickets/LDEV3349.cfc
@@ -1,50 +1,82 @@
-component extends="org.lucee.cfml.test.LuceeTestCase" skip=true {
+component extends="org.lucee.cfml.test.LuceeTestCase" {
function run( testResults, testBox ){
describe( "checking query string encoding for spaces", function() {
- variables.uri = createURI("LDEV3349/test.cfm");
+ variables.uri = createURI("LDEV3349/ldev3349.cfm");
it( title="cfhttp with queryString %20", body=function( currentSpec ){
local.result = _internalRequest(
template: variables.uri,
url: "%20"
);
- expect(result.filecontent).toBe("%20");
+ expect(result.filecontent).toBe(" =");
});
it( title="cfhttp with queryString space", body=function( currentSpec ){
local.result = _internalRequest(
template: variables.uri,
url: " "
);
- expect(result.filecontent).toBe("%20");
+ expect(result.filecontent).toBe(" =");
});
it( title="cfhttp with queryString +", body=function( currentSpec ){
local.result = _internalRequest(
template: variables.uri,
url: "+"
);
- expect(result.filecontent).toBe("%20");
+ expect(result.filecontent).toBe(" =");
});
it( title="cfhttp with queryString +%20", body=function( currentSpec ){
local.result = _internalRequest(
template: variables.uri,
url: "+%20"
);
- expect(result.filecontent).toBe("%20%20");
+ expect(result.filecontent).toBe(" =");
});
it( title="cfhttp with queryString %2B+%2B", body=function( currentSpec ){
local.result = _internalRequest(
template: variables.uri,
url: "%2B+%2B"
);
- expect(result.filecontent).toBe("%2B%20%2B");
+ expect(result.filecontent).toBe("+ +=");
});
it( title="cfhttp with queryString space1space", body=function( currentSpec ){
local.result = _internalRequest(
template: variables.uri,
url: " 1 "
);
- expect(result.filecontent).toBe("%2B%20%2B");
+ expect(result.filecontent).toBe(" 1 =");
+ });
+
+ it( title="cfhttp with queryString a=?", body=function( currentSpec ){
+ local.result = _internalRequest(
+ template: variables.uri,
+ url: "a=?" // ? is a reserved character and will be converted to %3F encoding
+ );
+ expect(result.filecontent).toBe("a=?");
+ });
+
+ it( title="cfhttp with queryString a=?&b=+", body=function( currentSpec ){
+ local.result = _internalRequest(
+ template: variables.uri,
+ url: "a=?&b=+" // ? is a reserved character and will be converted to %3F encoding
+ );
+ expect(result.filecontent).toBe("a=?&b= ");
+ });
+
+ it( title="cfhttp with queryString a=%3F&b= ", body=function( currentSpec ){
+ local.result = _internalRequest(
+ template: variables.uri,
+ url: "a=%3F&b=+"
+ );
+ expect(result.filecontent).toBe("a=?&b= ");
+ });
+
+ it( title="LDEV-5172 azure blob url problem", body=function( currentSpec ){
+ local.result = _internalRequest(
+ template: variables.uri,
+ url: "rscd=attachment%3B+filename%3D%22results.zip%22"
+ );
+ expect( result.filecontent ).toBe( 'rscd=attachment; filename="results.zip"' );
});
});
}
diff --git a/test/tickets/LDEV3349/ldev3349.cfm b/test/tickets/LDEV3349/ldev3349.cfm
new file mode 100644
index 0000000000..c199b378df
--- /dev/null
+++ b/test/tickets/LDEV3349/ldev3349.cfm
@@ -0,0 +1 @@
+#urlDecode(getPageContext().getRequest().getQueryString())#
\ No newline at end of file
diff --git a/test/tickets/LDEV3349/test.cfm b/test/tickets/LDEV3349/test.cfm
deleted file mode 100644
index 68fb31d085..0000000000
--- a/test/tickets/LDEV3349/test.cfm
+++ /dev/null
@@ -1 +0,0 @@
-#getPageContext().getRequest().getQueryString()#
\ No newline at end of file