Ticket #349 (closed defect: fixed)
Bug with SesUrlManager.cfc due to Apache and IIS reporting cgi params differently
| Reported by: | gcole | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Version: | 3.0.178 | Severity: | normal |
| Keywords: | Cc: |
Description
Apache and IIS report the cgi.PATH_INFO parameter differently.
Using SES urls, in IIS a call to www.mydomain.com/myapp/ will result in the SesUrlManager?.cfc generating an event called 'myapp'. This will cause an error unless a 'myapp' event has been defined.
To fix, replace
<cfif structKeyExists(arguments, "mockCgiScope")>
<cfset pathArray = listToArray(arguments.mockCgiScope.PATH_INFO, "/") />
<cfelse>
<cfset pathArray = listToArray(cgi.PATH_INFO, "/") />
</cfif>
with
<cfif structKeyExists(arguments, "mockCgiScope")>
<cfset pathArray = listToArray(arguments.mockCgiScope.PATH_INFO, "/") />
<cfelse>
<cfif cgi.PATH_INFO NEQ cgi.SCRIPT_NAME>
<cfset pathArray = listToArray(cgi.PATH_INFO, "/") />
<cfelse>
<cfset pathArray = arrayNew(1) />
</cfif>
</cfif>
Change History
Note: See
TracTickets for help on using
tickets.
![(please configure the [header_logo] section in trac.ini)](/ModelGlue.com/trac.cgi/chrome/site/your_project_logo.png)