Here's the base process class being used:
DEFINECLASS mcgBaseProcess AS wwProcess cAuthenticationMode = "UserSecurity" cAuthenticationUserSecurityClass = "mcgUserSecurity"*lEnableSessionState = .T.* Make sure a user is authenticated before continuingFUNCTION OnProcessInit()IF !This.Authenticate() && If they're not, a login form should appearRETURNENDIFDODEFAULT()ENDFUNCFUNCTION OnAuthenticateUser(tcUserName, tcPassword, tcErrorMsg)This.oUserSecurity = CREATEOBJECT(This.cAuthenticationUserSecurityClass)IF !This.oUserSecurity.Authenticate(m.tcUserName, m.tcPassword)*** Set lcErrorMsg to pass back via REF parm tcErrorMsg = this.oUserSecurity.cErrorMsgIF"expired" $ m.lcErrorMessage* TODO: Response.Redirect(Server.oConfig.cRedirectSignupTo)ENDIFRETURN .F.ELSEENDIFRETURN .T.ENDFUNCENDDEFINE
The mcgUserSecurity is basically just a subclass of wwUserSecurity that uses a different table, but otherwise is the same. This code seems to work as expected.
The Process class (subclassed from mcgBaseProcess) has a function that does the following:
Response.Write("Test2.wcs")
What it appears is happening is that the ContentTypeHeader gets set to "NONE" so that wwScripting is supposed to handle that kind of thing. When wwPageResponse.RenderHttpHeader() is called, since content type is "NONE" it immediately returns (and never reaches the code to write the cookies).
When I compared the old version to the new version, this code had been removed from wwPageResponse.ExpandScript() which means between this and RenderHttpHeader() just returning the new cookie never gets written:
** Keep reference to the 'real' Response object *** Now override the Response object so we can apply headers and cookiesPRIVATE Response Response = loScript.CreateResponse() Response.cStyleSheet = this.cStyleSheet*** WWAPGERESPONSE SPECIFIC CODEIFVARTYPE(tvContentType) != "L" Response.ContentTypeHeader( tvContentType )ELSE*** Copy headers and cookiesFOR lnX = 1 TOTHIS.Headers.Count Response.AppendHeader(this.Headers.GetKey(lnX),THIS.Headers.aItems[lnX,2])ENDFORFOR lnX = 1 TOTHIS.Cookies.Count Response.AppendHeader("Set-Cookie",this.Cookies.aItems[lnX,2])ENDFORENDIF
Does the header now have to be explicitly written out from the WCS script?