id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,branch,changelog,apichanges,internalchanges 697,Trac on IIS - redirect problems. ,josh_robb@…,Christopher Lenz,"This has taken 3 days to trac (wink) down. GRRRRRRRRR - it's not your fault - it's MS's crazy CGI implementation. If you can manage to get Trac installed and running on IIS (see tickets #693 #692) then you will find that viewing pages (http GET's) works correctly but any attemt to perform a http POST will stall the server or result in Trac error messages. Symptoms * "" Sorry, Cannot create new version, this page has already been modified by someone else."" - for the Wiki. * 10's - 100's of identical tickets created when you submit the new ticket form. * IIS gets an stack overflow. (i've not seen this but it's been reported and seems likely). The cause is this: http://support.microsoft.com/default.aspx?scid=kb;en-us;221154 Which is bizzarly cryptic but basically - if you watch network traces of the post occuring you will never see the 302 redirect come back from the server. The reason is because IIS issues the GET request on the serverside if the Location: header is relative. This results in an infinate loop for tickets and an write conflict for Wiki pages (version mismatch). The work around I have discovered is as follows: in core.py {{{ #!python class Request: def redirect(self, url): add the following line: #the http://servername bit only! - i.e. no script path etc. base_url = '%s://%s' % (""http"", os.getenv('SERVER_NAME')) change the following: self.send_header('Location', burl + url) }}} This forces the Location: header to be absolute which keeps everything working. I know this is rubbish. It will break for HTTPS and really the base_url code should be moved into the Request class (?? maybe? ) so that all the base_url logic is in one place. ",defect,closed,high,0.9,general,0.7.1,blocker,fixed,IIS redirect CGI windows,josh_robb@…,,,,