yep that seems to be a bug. if I were you, I would submit a bug report with a patch to http://support.castleproject.org/projects/MR And include a test that shows the bug.
Cheers John On Mar 4, 2:02 am, Alexandra Tikhonova <[email protected]> wrote: > Hi > > Assume we have public home page (http://mydomain/Home/Index.rails) > which has a link to a secure registration page (https://mydomain/ > Registration/Form.rails) > > While the home page index view generation our custom LinkHelper builds > link url for the secure registration page using DefaultUrlBuilder. > For this minimal set of parameters: > absolute : true > protocol : https > area : > controller : Registration > action : Form > we got the following URL:https://mydomain:80/Registration/Form.rails. > Looks strange and is invalid. > > We added explicit ssl port to the parameters passed to > DefaultUrlBuilder: > absolute : true > protocol : https > port: 443 > area : > controller : Registration > action : Form > and got more surprising result:https://mydomain:0/Registration/Form.rails. > > This is the part of > DefaultUrlBuilder.ApplyBasePathOrAbsolutePathIfNecessary method which > generates an absolute path part > > if (createAbsolutePath) > { > string domain = parameters.Domain ?? current.Domain; > string subdomain = parameters.Subdomain ?? current.Subdomain; > string protocol = parameters.Protocol ?? current.Protocol; > int port = (parameters.Port == 0) ? current.Port : 0; > bool includePort = ((protocol == "http") && (port != 80)) || > ((protocol == "https") && (port != 443)); > path = protocol + "://"; > if (!string.IsNullOrEmpty(subdomain)) > { > path = path + subdomain + "." + domain; > } > else > { > path = path + domain; > } > if (includePort) > { > path = path + ":" + port; > } > path = path + this.ComputeStandardBasePath(appVirtualDir, > area); > } > > Isn't there a bug in retrieving port from parameters and current > settings? > > int port = (parameters.Port == 0) ? current.Port : 0; > > It seems that explicit port can never be set through custom parameters > passed to DefaultUrlBuilder. > > We use Monorail trunk build 1040. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" 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/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
