Thanks for that. I extended the SesUrlManager.cfc like you said, overriding
extractValues().

 

The new function changes 

 

<cfif structKeyExists(arguments, "mockCgiScope")>

                        <cfset pathArray =
listToArray(arguments.mockCgiScope.PATH_INFO, "/") />

            <cfelse>

                        <cfset pathArray = listToArray(cgi.PATH_INFO, "/")
/>

            </cfif>

 

to

 

 

            <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>

 

It feels like a hack, just making sure that PATH_INFO is different from
SCRIPT_NAME, but seems to work so far.

I'll go with it for now, and report back if it causes any issues.

 

Thanks

 

-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Chris Blackwell
Sent: 21 July 2009 16:53
To: [email protected]
Subject: [Model-Glue] Re: possible bug with ses urls

 

I don't think its a bug in Apache or IIS, its just a difference.  It should
be fairly easy to work around this though without changing the core MG code.

 

create a cfc that extends ModelGlue.gesture.eventrequest.url.SesUrlManager.

override the extractValues method to catch and fix your iis/apache variation

create a bean in your config/ModelGlue.xml file to tell MG to use your url
manager

 

<bean id="modelglue.UrlManager" class="my.cfc.CustomUrlManager">

            <property name="modelGlue">

                        <ref bean="modelglue.ModelGlue" />

            </property>

</bean>

 

bobs your uncle..etc

 

 

2009/7/21 Gareth Cole <[email protected]>

Hi,

 

I've just started using the MG3 beta, and tried implementing the SES urls.

 

They work ok on my local system running Apache, but there seems to be a
problem with the default event on our development server (running IIS).

 

I've tracked it down to the cgi.path_info value. For apache, this is an
empty string, but IIS sets this as /rms/index.cfm, where 'rms' is the name
of my application. 

 

I'm assuming this is either a bug with Apache, IIS or CF's implementation of
it. However, I can only make changes to MG.

Is there a fix I can put in SesUrlManager.cfc, or should I do a work-around
in my code?

 

Thanks

 

 

 




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

For more about Model-Glue, check http://www.model-glue.com .
-~----------~----~----~----~------~----~------~--~---

Reply via email to