[Moin-devel] Re: 1.3.2 does not run on IIS due to error in request.py

Alexander Schremmer 2004b at usenet.alexanderweb.de
Wed Jan 26 07:50:03 EST 2005


On Wed, 26 Jan 2005 12:49:48 +0100, Robert Seeger wrote:

>> No, it was not. The first check should just run if a) there is an
>> request_uri (a valid one) and b) the server is not Apache 1.3.
>> I guess you screwed up request_uri (your code does not seem
>> to assemble it
>> correctly) and glitched into this problem. I am not sure if I
>> should have
>> expected such a broken request_uri :-)
>>

[...]
> As a result, however, I get a configuration error:
> 
>  MoinMoin Configuration Error
>  Could not find a match for url: "ors-x-know".
> 
>  Check your URL regular expressions in the "wikis" list in "farmconfig.py".
> 
> The reason for this is that the checked url (in multiconfig.getConfig(url))
> only contains the server name, but not the part that identifies a wiki
> instance.
> This again is due to request.py, line 253:
>         self.url = self.server_name + self.request_uri
> 
> which does not work if there is no significant self.request_uri
> 
> Here is some details about my installation:
> 
> I'm running a farm on a single server {{{ors-x-know}}} with a number of wiki
> instances. The following table lists their url in IIS, the regex and
> wikiname used in farmconfig.py
> 
>  ||URL                                        ||wikiname||regex||
> 
>||{{{http://ors-x-know/master11cgi/moin.cgi}}}||master11||{{{r".*master11.*$
> "}}}||
> 
>||{{{http://ors-x-know/master13cgi/moin.cgi}}}||master13||{{{r".*master13.*$
> "}}}||
> 
>||{{{http://ors-x-know/devinfocgi/moin.cgi}}}||master13||{{{r".*devinfo.*$"}
> }}||
> 
> With the above setting, the checked url is only {{{ors-x-know}}}
> 
> This is why I did the mentioned hack:
> 	self.request_uri = env.get('REQUEST_URI', '%s'%self.script_name)
> and glitched into the wrong check.
> 
> I have now modified this hack:
>  * In the IIS specific patch starting on line 233, add:
>             self.request_uri = '%s'%self.script_name
> 
> This makes the checked url e.g. {{{ors-x-know/master13cgi/moin.cgi}}} which
> makes my setting happy, though it might not be the correct value for
> request_uri (should probably include the full path and parameters?)
> 
> Maybe the proper solution would be to set self.url differently in the
> RequestCGI class (some other derived classes do this)?

Yeah, it should be. Assuming that request_uri contains something useful
should be considered evil. :-) I will look into this ...

Kind regards,
Alexander





More information about the Moin-devel mailing list