Skip to content

Commit

Permalink
Fix for issue #932 by merging in fix of issue #909 from dev branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan Brichau committed Jul 14, 2017
1 parent ac71d84 commit e77f34b
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 123 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ parseQuery: aString from: queryStart to: queryEnd
parameterEnd := parameterEnd > 0
ifTrue: [ parameterEnd min: queryEnd ]
ifFalse: [ queryEnd ].
(nameEnd > 0 and: [ nameEnd < queryEnd ])
(nameEnd > 0 and: [ nameEnd < parameterEnd ])
ifTrue: [
self
addField: (self class decodePercentAndPlus: aString from: parameterStart to: nameEnd)
Expand Down
133 changes: 65 additions & 68 deletions repository/Seaside-Core.package/WAUrl.class/methodProperties.json
Original file line number Diff line number Diff line change
@@ -1,84 +1,81 @@
{
"class" : {
"absolute:" : "lr 3/26/2008 20:55",
"absolute:relative:" : "jf 9/22/2008 12:46",
"decodePercent:" : "pmm 9/8/2013 11:10",
"decodePercent:from:" : "pmm 8/20/2014 11:20",
"decodePercent:from:to:" : "pmm 8/20/2014 15:12",
"decodePercentAndPlus:from:to:" : "pmm 8/24/2014 10:33" },
"instance" : {
"host" : "jf 2/14/2010 23:47",
"parseQuery:from:to:" : "pmm 8/22/2014 09:32",
"printOn:" : "jf 9/30/2009 00:27",
"withoutQuery" : "lr 2/27/2010 11:06",
"encodeQueryOn:" : "pmm 6/26/2011 14:27",
"parsePort:from:to:" : "pmm 8/20/2014 12:28",
"port" : "lr 8/17/2007 20:22",
"pathUnencodedOn:" : "pmm 9/13/2013 11:04",
"postCopy" : "pmm 7/7/2011 21:05",
"privatePathParameterMapAt:ifPresentDo:ifAbsent:" : "pmm 8/24/2014 10:34",
"slash:" : "lr 8/11/2009 09:58",
"seasideUrl" : "jf 9/22/2008 12:28",
"isSsl" : "pmm 7/31/2010 11:12",
"with:" : "avi 3/22/2004 00:52",
"parseHostPort:from:to:" : "pmm 8/22/2014 09:16",
"=" : "lr 9/8/2009 12:50",
"addAllToPath:" : "lr 8/11/2009 09:58",
"initialize" : "lr 8/11/2009 09:56",
"addField:" : "jf 2/15/2010 02:01",
"addField:value:" : "jf 2/15/2010 16:09",
"slash" : "lr 8/11/2009 09:58",
"addPathParameterAt:key:" : "pmm 7/7/2011 20:28",
"addPathParameterAt:key:value:" : "pmm 7/7/2011 20:28",
"addToPath:" : "pmm 7/5/2011 20:02",
"decode:" : "lr 7/25/2011 20:13",
"decodedWith:" : "jf 2/15/2010 02:08",
"detectCommonPathElementClass" : "pmm 8/19/2014 10:31",
"encodeFragmentOn:" : "jf 2/15/2010 02:25",
"encodeOn:" : "lr 2/27/2010 11:09",
"encodePathOn:" : "pmm 7/10/2011 16:42",
"pathParameterAt:key:ifAbsent:" : "pmm 8/19/2014 10:31",
"path" : "pmm 8/20/2014 10:10",
"pathElementsIn:do:" : "pmm 2/25/2012 11:20",
"encodePathParametersAt:on:" : "JohanBrichau 3/20/2016 14:35",
"encodeQueryOn:" : "pmm 6/26/2011 14:27",
"encodeSchemeAndAuthorityOn:" : "jf 2/15/2010 01:00",
"fragment" : "lr 10/28/2007 14:42",
"fragment:" : "lr 8/17/2007 20:18",
"hash" : "jf 2/14/2010 23:50",
"host" : "jf 2/14/2010 23:47",
"host:" : "jf 2/14/2010 23:48",
"initialize" : "lr 8/11/2009 09:56",
"initializeFromString:" : "pmm 8/24/2014 10:33",
"isSeasideField:" : "lr 8/17/2007 22:49",
"isSsl" : "pmm 7/31/2010 11:12",
"parseAuthority:from:to:" : "pmm 8/21/2014 11:13",
"parseFragment:from:" : "pmm 8/20/2014 11:25",
"parseHostPort:from:to:" : "pmm 8/22/2014 09:16",
"parsePath:" : "pmm 8/21/2014 11:17",
"parsePath:absolute:from:to:" : "pmm 8/22/2014 10:05",
"parsePathParameters:at:from:to:" : "pmm 8/22/2014 10:38",
"addField:" : "jf 2/15/2010 02:01",
"pathStringSafeUnencoded" : "pmm 8/19/2014 10:31",
"relativeTo:" : "lr 9/8/2009 12:50",
"withoutFragment" : "lr 10/10/2010 15:11",
"pathParameterAllAt:key:ifAbsent:" : "pmm 8/19/2014 10:30",
"addPathParameterAt:key:value:" : "pmm 7/7/2011 20:28",
"privatePathParameterMapAt:" : "pmm 9/11/2011 20:49",
"fragment" : "lr 10/28/2007 14:42",
"parsePort:from:to:" : "pmm 8/20/2014 12:28",
"parseQuery:from:to:" : "pmm 2/28/2017 18:56",
"parseUserPassword:from:to:" : "pmm 8/21/2014 11:49",
"hash" : "jf 2/14/2010 23:50",
"password" : "jf 2/15/2010 01:00",
"password:" : "jf 2/15/2010 00:45",
"path" : "pmm 8/20/2014 10:10",
"path:" : "lr 10/28/2007 14:42",
"pathElementsIn:do:" : "pmm 2/25/2012 11:20",
"pathEncodedWith:on:" : "pmm 3/16/2013 17:22",
"pathParameterAllAt:key:ifAbsent:" : "pmm 8/19/2014 10:30",
"pathParameterAt:key:ifAbsent:" : "pmm 8/19/2014 10:31",
"pathStringEncodedWith:" : "pmm 3/16/2013 17:46",
"pathStringSafeUnencoded" : "pmm 8/19/2014 10:31",
"pathStringUnencoded" : "pmm 4/18/2014 13:21",
"pathStringUnencodedSize" : "pmm 3/16/2013 16:42",
"queryFields:" : "jf 2/15/2010 01:38",
"encodeSchemeAndAuthorityOn:" : "jf 2/15/2010 01:00",
"pathUnencodedOn:" : "pmm 9/13/2013 11:04",
"port" : "lr 8/17/2007 20:22",
"port:" : "lr 8/17/2007 20:22",
"postCopy" : "pmm 7/7/2011 21:05",
"printOn:" : "jf 9/30/2009 00:27",
"privatePathParameterMapAt:" : "pmm 9/11/2011 20:49",
"privatePathParameterMapAt:ifPresentDo:ifAbsent:" : "pmm 8/24/2014 10:34",
"queryFields" : "jf 2/15/2010 17:26",
"encodeOn:" : "lr 2/27/2010 11:09",
"queryFields:" : "jf 2/15/2010 01:38",
"queryString" : "pmm 8/14/2011 22:37",
"relativeTo:" : "lr 9/8/2009 12:50",
"scheme" : "lr 7/16/2009 21:42",
"parsePath:absolute:from:to:" : "pmm 8/22/2014 10:05",
"scheme:" : "jf 1/30/2010 23:28",
"pathStringEncodedWith:" : "pmm 3/16/2013 17:46",
"host:" : "jf 2/14/2010 23:48",
"decodedWith:" : "jf 2/15/2010 02:08",
"queryString" : "pmm 8/14/2011 22:37",
"password:" : "jf 2/15/2010 00:45",
"seasideUrl" : "jf 9/22/2008 12:28",
"slash" : "lr 8/11/2009 09:58",
"slash:" : "lr 8/11/2009 09:58",
"takeServerParametersFromRequest:" : "pmm 8/21/2014 11:11",
"user" : "jf 2/15/2010 01:00",
"user:" : "jf 2/15/2010 01:00",
"addPathParameterAt:key:" : "pmm 7/7/2011 20:28",
"userinfo" : "pmm 8/19/2014 10:31",
"isSeasideField:" : "lr 8/17/2007 22:49",
"decode:" : "lr 7/25/2011 20:13",
"parseAuthority:from:to:" : "pmm 8/21/2014 11:13",
"parsePath:" : "pmm 8/21/2014 11:17",
"port:" : "lr 8/17/2007 20:22",
"addToPath:" : "pmm 7/5/2011 20:02",
"parseFragment:from:" : "pmm 8/20/2014 11:25",
"path:" : "lr 10/28/2007 14:42",
"pathEncodedWith:on:" : "pmm 3/16/2013 17:22",
"detectCommonPathElementClass" : "pmm 8/19/2014 10:31",
"=" : "lr 9/8/2009 12:50",
"takeServerParametersFromRequest:" : "pmm 8/21/2014 11:11",
"withField:" : "jf 2/15/2010 02:11",
"userinfo:" : "jf 2/15/2010 01:00",
"password" : "jf 2/15/2010 01:00",
"initializeFromString:" : "pmm 8/24/2014 10:33",
"pathStringUnencoded" : "pmm 4/18/2014 13:21",
"encodeFragmentOn:" : "jf 2/15/2010 02:25",
"encodePathParametersAt:on:" : "JohanBrichau 3/20/2016 14:35",
"withField:value:" : "jf 2/15/2010 02:12"
},
"class" : {
"decodePercent:from:" : "pmm 8/20/2014 11:20",
"decodePercent:from:to:" : "pmm 8/20/2014 15:12",
"absolute:relative:" : "jf 9/22/2008 12:46",
"decodePercent:" : "pmm 9/8/2013 11:10",
"decodePercentAndPlus:from:to:" : "pmm 8/24/2014 10:33",
"absolute:" : "lr 3/26/2008 20:55"
}
}
"with:" : "avi 3/22/2004 00:52",
"withField:" : "jf 2/15/2010 02:11",
"withField:value:" : "jf 2/15/2010 02:12",
"withoutFragment" : "lr 10/10/2010 15:11",
"withoutQuery" : "lr 2/27/2010 11:06" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
testing-parsing
testNoParameter
"https://github.com/SeasideSt/Seaside/issues/909"
| string |
string := '/Buchhaltung?_s=F4N82ZReQEV2M1cP&_k=spf8TDq4kzHfrPCi&48&searchText=kas'.
url := WAUrl absolute: string.
self assert: (url queryFields includesKey: '48').
self assert: (url queryFields at: '48') isNil.
self assert: url greaseString equals: string
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
{
"class" : {
},
"instance" : {
"absoluteExamples" : "pmm 8/27/2011 15:44",
"ambigousExamples" : "pmm 8/22/2014 09:20",
"asString:" : "lr 7/16/2009 09:49",
"testAddToPathWithLeadingSlash" : "pmm 12/5/2010 13:36",
"testConversion" : "pmm 9/1/2012 15:24",
"testCopyWithPathParameterValue" : "pmm 7/7/2011 21:06",
"testFragment" : "jf 9/30/2009 01:10",
"testParseAmbigous" : "pmm 6/26/2011 14:26",
"equalExamples" : "pmm 8/21/2014 11:41",
"invalidExamples" : "pmm 8/22/2014 10:40",
"relativeExamples" : "lr 3/26/2008 22:15",
"setUp" : "lr 8/17/2007 21:05",
"testAddAllToPath" : "jf 9/30/2009 01:10",
"testAddField" : "jf 2/15/2010 02:06",
"testAddFieldValue" : "jf 2/23/2010 12:26",
"testPathEncoding" : "lr 10/18/2008 12:16",
"testAddPathParameter" : "pmm 8/6/2011 15:44",
"testUserinfo" : "jf 2/15/2010 01:28",
"testIsSsl" : "pmm 7/31/2010 11:11",
"testWithFieldValue" : "lr 10/10/2010 16:48",
"testParseInvalid" : "pmm 8/22/2014 10:41",
"testWithoutFragment" : "lr 10/10/2010 16:43",
"testParseRelative" : "pmm 7/5/2011 20:19",
"testCopyWithPathParameter" : "pmm 7/7/2011 21:06",
"testSlash" : "jf 2/14/2010 23:54",
"testPassword" : "jf 2/15/2010 01:08",
"testTakeServerParametersFromRequestHttps" : "pmm 6/26/2011 14:26",
"testWithField" : "lr 10/10/2010 16:48",
"testHost" : "jf 2/14/2010 23:51",
"testAddToPathEmptyString" : "pmm 9/2/2012 11:19",
"testAddToPathWithLeadingAndTrailingSlash" : "pmm 12/5/2010 13:36",
"testScheme" : "jf 2/14/2010 23:54",
"testNastyEdgeCasesParsing" : "pmm 8/22/2014 10:38",
"testParseAbsolute" : "pmm 6/26/2011 14:26",
"testQueryEncoding" : "jf 2/15/2010 02:12",
"testAddToPathWithLeadingSlash" : "pmm 12/5/2010 13:36",
"testAddToPathWithTrailingSlashOnly" : "pmm 12/5/2010 13:37",
"testAddToPathWithoutLeadingSlash" : "pmm 12/5/2010 13:52",
"testConversion" : "pmm 9/1/2012 15:24",
"testCopy" : "lr 10/10/2010 16:41",
"testCopyWithPathParameter" : "pmm 7/7/2011 21:06",
"testCopyWithPathParameterValue" : "pmm 7/7/2011 21:06",
"testDecodedWith" : "jf 2/15/2010 01:50",
"testPort" : "jf 2/14/2010 23:54",
"ambigousExamples" : "pmm 8/22/2014 09:20",
"testEqual" : "jf 2/15/2010 02:13",
"testFragment" : "jf 9/30/2009 01:10",
"testHash" : "jf 2/14/2010 23:53",
"testHost" : "jf 2/14/2010 23:51",
"testInvalidSyntax" : "pmm 9/8/2013 11:13",
"testIsSsl" : "pmm 7/31/2010 11:11",
"testNastyEdgeCasesParsing" : "pmm 8/22/2014 10:38",
"testNastyEdgeCasesSerialization" : "pmm 8/22/2014 11:51",
"testNoParameter" : "pmm 2/28/2017 19:05",
"testParseAbsolute" : "pmm 6/26/2011 14:26",
"testParseAmbigous" : "pmm 6/26/2011 14:26",
"testParseEqual" : "pmm 3/28/2008 22:17",
"testParseInvalid" : "pmm 8/22/2014 10:41",
"testParseRelative" : "pmm 7/5/2011 20:19",
"testPassword" : "jf 2/15/2010 01:08",
"testPath" : "jf 9/30/2009 01:10",
"testAddToPathWithoutLeadingSlash" : "pmm 12/5/2010 13:52",
"testInvalidSyntax" : "pmm 9/8/2013 11:13",
"relativeExamples" : "lr 3/26/2008 22:15",
"invalidExamples" : "pmm 8/22/2014 10:40",
"testAddToPathWithTrailingSlashOnly" : "pmm 12/5/2010 13:37",
"testWithoutQuery" : "lr 10/10/2010 16:47",
"absoluteExamples" : "pmm 8/27/2011 15:44",
"testPathEncoding" : "lr 10/18/2008 12:16",
"testPathString" : "pmm 8/24/2014 10:40",
"testEqual" : "jf 2/15/2010 02:13",
"testQueryFields" : "pmm 9/1/2012 15:23",
"testTakeServerParametersFromRequestBase" : "pmm 6/26/2011 14:26",
"testPathStringUnencoded" : "pmm 3/16/2013 16:47",
"testPort" : "jf 2/14/2010 23:54",
"testQueryEmpty" : "lr 2/27/2010 11:10",
"testHash" : "jf 2/14/2010 23:53",
"testRelativeTo" : "pmm 9/1/2012 15:23",
"equalExamples" : "pmm 8/21/2014 11:41",
"testQueryEncoding" : "jf 2/15/2010 02:12",
"testQueryFields" : "pmm 9/1/2012 15:23",
"testQueryString" : "pmm 9/1/2012 16:52",
"testRelativeTo" : "pmm 9/1/2012 15:23",
"testScheme" : "jf 2/14/2010 23:54",
"testSlash" : "jf 2/14/2010 23:54",
"testTakeServerParametersFromRequest" : "lr 8/11/2009 10:04",
"testAddAllToPath" : "jf 9/30/2009 01:10",
"testCopy" : "lr 10/10/2010 16:41",
"setUp" : "lr 8/17/2007 21:05",
"testPathStringUnencoded" : "pmm 3/16/2013 16:47",
"testTakeServerParametersFromRequestBase" : "pmm 6/26/2011 14:26",
"testTakeServerParametersFromRequestHttps" : "pmm 6/26/2011 14:26",
"testUser" : "jf 2/15/2010 01:08",
"testWith" : "lr 10/10/2010 16:48"
},
"class" : { }
}
"testUserinfo" : "jf 2/15/2010 01:28",
"testWith" : "lr 10/10/2010 16:48",
"testWithField" : "lr 10/10/2010 16:48",
"testWithFieldValue" : "lr 10/10/2010 16:48",
"testWithoutFragment" : "lr 10/10/2010 16:43",
"testWithoutQuery" : "lr 10/10/2010 16:47" } }
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"commentStamp" : "",
"super" : "WAContextTest",
"category" : "Seaside-Tests-Core-HTTP",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
"url"
],
"url" ],
"name" : "WAUrlTest",
"type" : "normal"
}
"pools" : [
],
"super" : "WAContextTest",
"type" : "normal" }

0 comments on commit e77f34b

Please # to comment.