Forum Discussion
Hflower
12 years agoOccasional Contributor
YES!
that's it Erik, thank you so much
I had manged to sort() the params value before I used them, but I haven't tested enough URIs to be sure it always comes out alphabetically.
that's it Erik, thank you so much
I had manged to sort() the params value before I used them, but I haven't tested enough URIs to be sure it always comes out alphabetically.
requestPath = context.getProperty( "requestUri" )
//log.info "requestPath is ${requestPath}"
pathToSign = requestPath.URI.toString()
params = context.getProperty("httpResponseProperties")
//log.info "Params is ${params}"
path = request.getPath();
//log.info "Path is ${path}"
if ( path =~ '''}'''){
//log.info("Do Nothing")
}else{
def queryString = "?"
request.params.sort().each{ param ->
if((queryString.length() != 1) && (param.value.value != '') )
queryString += "&${param.value.name}=${param.value.value}"
//testString = "${param.value.value}"
else if (param.value.value != ''){
queryString += "${param.value.name}=${param.value.value}"
}
}
pathToSign += queryString
}
Related Content
- 2 years agochip1914