Sure Luis,
I simply replaced lines 258 - 269 of ses.cfc which used to read
thusly:
<!--- fix URL variables (IIS only) --->
<cfif requestString CONTAINS "?">
<!--- Match the positioning of the ? --->
<cfset varMatch = REFind("\?.*=", requestString, 1, "TRUE") />
<!--- Now copy values to the RC. --->
<cfset qsValues = REreplacenocase(requestString,"^.*\?","","all")>
<cfloop list="#qsValues#" index="qsVal" delimiters="&">
<cfset rc[listFirst(qsVal,"=")] = listLast(qsVal,"=")>
</cfloop>
<!--- Clean the request string. --->
<cfset requestString = Mid(requestString, 1, (varMatch.pos[1]-1)) />
</cfif>
...to read like this:
<!--- fix URL variables (IIS only) --->
<!--- Match the positioning of the ? --->
<cfset varMatch = REFind("\?.*=", requestString, 1, "TRUE") />
<cfif varMatch.pos[1]>
<!--- Now copy values to the RC. --->
<cfset qsValues = REreplacenocase(requestString,"^.*\?","","all")>
<cfloop list="#qsValues#" index="qsVal" delimiters="&">
<cfset rc[listFirst(qsVal,"=")] = listLast(qsVal,"=")>
</cfloop>
<!--- Clean the request string. --->
<cfset requestString = Mid(requestString, 1, (varMatch.pos[1]-1)) />
</cfif>
The only difference really is I removed the contains statement, and
consistently used the the same regex search to decide whether the CFIF
should be entered. Performance is the only reason I can imagine that
contains would have been used, but that's just a guess. The problem
was that the contains statement is a more liberal search than the
regex which looked for additional characters along with the question
mark. Just because the CFIF got entered didn't necessarily mean that
the regex was going to find anything.
Also, here is a more realistic URL from our application which errored
before my change:
http://devadmin.example.com/index.cfm/ContactManager/ehCompanyAdmin/search/%3F
@Oguz: I don't think my code change above really deals with encoding
so much as consistency in the token being searched for since the mid
function at the bottom of the CFIF block assumes the regular
expression WILL find a match if the CFIF has been entered.
~Brad
On Jun 16, 1:20 pm, Luis Majano <
lmaj...@gmail.com> wrote:
> Brad can you post your solution.
>
> Luis
>