From: David O'C. <da...@go...> - 2001-06-28 10:58:28
|
Hi, I'm having a problem using a .psp files as a directory index. I've setup Apache to accept index.psp as a recognised index and I have an index.psp file in a directory called ww. If I try to access: http://host/test/ww/ the browser continuously redirects adding one more '/' each time. So, I end up with: http://host/test/ww//////////////////////////////////////////// and I get an error from the browser. I've tried this with both mod_snake and mod_webkit and also using default.psp instead of index.psp, in case there was a conflict between WebKit and Apache trying to work out these index URLs. They all gave the same problem. I can't seem to track down where slashes are being added... Any thoughts on this? Regards, David O'Callaghan -- "And that no man might buy or sell, save he that had the mark, or the name of the beast, or the number of his name." --Microsoft Passport EULA / Revelation 13:17 |
From: Chuck E. <Chu...@ya...> - 2001-06-28 13:05:31
|
At 11:58 AM 6/28/2001 +0100, David O'Callaghan wrote: >I can't seem to track down where slashes are being added... > >Any thoughts on this? Someone else reported this after Robin Dunn's MakeAppWorkDir mods, also claiming that the problem did not exist prior to that. Robin, do you have any thoughts on this? -Chuck |
From: David O'C. <da...@go...> - 2001-06-28 13:40:56
|
> At 11:58 AM 6/28/2001 +0100, David O'Callaghan wrote: > >I can't seem to track down where slashes are being added... > > > >Any thoughts on this? > > Someone else reported this after Robin Dunn's MakeAppWorkDir mods, also > claiming that the problem did not exist prior to that. > Well I know where this is happening now: it's in the handleDeficientDirectoryURL method of the Application class. I'm at a loss as to how I could fix this without breaking the rest of the code. A simple modification is to change this: uri[0] = uri[0] + '/' into this: if not uri[0][-1] == '/': uri[0] = uri[0] + '/' But this just puts the system into an endless loop, constantly redirecting to the same page (as opposed to adding a '/' each time). Regards, David O'Callaghan |
From: David O'C. <da...@go...> - 2001-06-28 14:49:04
|
Replying to my own message again... I can get the result I want with this patch to the handleDeficientDirectoryURL method of Application.py, but it adds an ugly scriptname to my URL... The upside is it doesn't seem to break the rest of Webware. 351c351,356 < uri[0] = uri[0] + '/' --- > if not uri[0][-1] == '/': > uri[0] = uri[0] + '/' > else: # the script_name after the final slash should be used > script_name = transaction.request().environ()['SCRIPT_NAME'] > uri[0] = uri[0] + script_name[string.rfind(script_name, '/')+1:] > I'd still be interested in a more elegant solution, and to find the cause of this problem. Regards, David O'Callaghan |
From: Robin D. <ro...@wx...> - 2001-06-29 17:58:48
|
> > I can get the result I want with this patch to the > handleDeficientDirectoryURL method of Application.py, but it adds an ugly > scriptname to my URL... The upside is it doesn't seem to break the rest of > Webware. > > 351c351,356 > < uri[0] = uri[0] + '/' > --- > > if not uri[0][-1] == '/': > > uri[0] = uri[0] + '/' > > else: # the script_name after the final slash should be used > > script_name = transaction.request().environ()['SCRIPT_NAME'] > > uri[0] = uri[0] + script_name[string.rfind(script_name, '/')+1:] > > > From this patch it looks like you're working with 0.5.1 and not the main CVS trunk, right? The code there has already been changed to this: uriEnd = string.split(uri[0], '/')[-1] uri[0] = './' + uriEnd + '/' -- Robin Dunn Software Craftsman robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython! |
From: Jack M. <ja...@xi...> - 2001-07-01 03:02:06
|
Just to chime in on this. I too just encountered this problem. This fix works: > > 351c351,356 > > < uri[0] = uri[0] + '/' > > --- > > > if not uri[0][-1] == '/': > > > uri[0] = uri[0] + '/' > > > else: # the script_name after the final slash should be used > > > script_name = transaction.request().environ()['SCRIPT_NAME'] > > > uri[0] = uri[0] + script_name[string.rfind(script_name, '/')+1:] > > > > > But this one just causes infinite loops. > uriEnd = string.split(uri[0], '/')[-1] > uri[0] = './' + uriEnd + '/' Any chance a definitive patch could be committed? :) jack. |
From: David O'C. <da...@go...> - 2001-07-02 10:19:37
|
> > I can get the result I want with this patch to the > > handleDeficientDirectoryURL method of Application.py, but it adds an ugly > > scriptname to my URL... The upside is it doesn't seem to break the rest of > > Webware. > > > > 351c351,356 > > < uri[0] = uri[0] + '/' > > --- > > > if not uri[0][-1] == '/': > > > uri[0] = uri[0] + '/' > > > else: # the script_name after the final slash should be used > > > script_name = transaction.request().environ()['SCRIPT_NAME'] > > > uri[0] = uri[0] + script_name[string.rfind(script_name, '/')+1:] > > > > > > > >From this patch it looks like you're working with 0.5.1 and not the main CVS > trunk, right? The code there has already been changed to this: > > uriEnd = string.split(uri[0], '/')[-1] > uri[0] = './' + uriEnd + '/' > Yep, I'm using 0.5.1rc3. I'll give that a go, I guess. David |
From: Robin D. <ro...@wx...> - 2001-06-28 15:20:30
|
> At 11:58 AM 6/28/2001 +0100, David O'Callaghan wrote: > >I can't seem to track down where slashes are being added... > > > >Any thoughts on this? > > Someone else reported this after Robin Dunn's MakeAppWorkDir mods, also > claiming that the problem did not exist prior to that. > > Robin, do you have any thoughts on this? I can't think of anything I did that might have caused it, but I'll take a look. -- Robin Dunn Software Craftsman robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython! |
From: Jay L. <js...@js...> - 2001-08-04 04:40:35
|
I think the patch from John Reese that I just committed should fix this. Jay On 28 Jun 2001 11:58:24 +0100, David O'Callaghan wrote: > Hi, > > I'm having a problem using a .psp files as a directory index. > I've setup Apache to accept index.psp as a recognised index > and I have an index.psp file in a directory called ww. > > If I try to access: > http://host/test/ww/ > > the browser continuously redirects adding one more '/' each time. > > So, I end up with: > http://host/test/ww//////////////////////////////////////////// > > and I get an error from the browser. > > I've tried this with both mod_snake and mod_webkit and also using > default.psp instead of index.psp, in case there was a conflict between > WebKit and Apache trying to work out these index URLs. They all gave > the same problem. > > I can't seem to track down where slashes are being added... > > Any thoughts on this? > > Regards, > > David O'Callaghan > > -- > "And that no man might buy or sell, save he that had the mark, > or the name of the beast, or the number of his name." > --Microsoft Passport EULA / Revelation 13:17 > > > > _______________________________________________ > Webware-discuss mailing list > Web...@li... > http://lists.sourceforge.net/lists/listinfo/webware-discuss |