public
Description: Phusion Passenger (mod_rails)
Homepage: http://www.modrails.com/
Clone URL: git://github.com/FooBarWidget/passenger.git
Search Repo:
Click here to lend your support to: passenger and make a donation at www.pledgie.com !
Ignore RailsAllowModRewrite directive for Rails base URIs. Fixes issue 
#11.
Hongli Lai (Phusion) (author)
Sat Apr 26 04:58:11 -0700 2008
commit  59838b9704e6fa966b51f93379fed10d13a7dae9
tree    82b8d33536c70f355325650b005d6a3f4caf1475
parent  bd59941af79a6d1c8d2ea6e42b61ffbf5ab57c3c
...
453
454
455
 
456
457
458
 
 
459
460
461
...
515
516
517
 
 
 
 
 
 
518
519
520
...
453
454
455
456
457
 
 
458
459
460
461
462
...
516
517
518
519
520
521
522
523
524
525
526
527
0
@@ -453,9 +453,10 @@
0
   mapToStorage(request_rec *r) {
0
     DirConfig *config = getDirConfig(r);
0
     bool forwardToRails;
0
+ const char *baseURI;
0
     
0
- if (determineRailsBaseURI(r, config) == NULL
0
- || fileExists(r->filename)) {
0
+ baseURI = determineRailsBaseURI(r, config);
0
+ if (baseURI == NULL || fileExists(r->filename)) {
0
       /*
0
        * fileExists():
0
        * If the file already exists, serve it directly.
0
@@ -515,6 +516,12 @@
0
          * they don't want to abandon. Those people will have to
0
          * make sure that the Rails app's .htaccess doesn't
0
          * interfere.
0
+ */
0
+ return OK;
0
+ } else if (strcmp(r->uri, baseURI) == 0) {
0
+ /* But we ignore RailsAllowModRewrite for the base URI of
0
+ * the Rails application. Otherwise, Apache will show a
0
+ * directory listing. This fixes issue #11.
0
          */
0
         return OK;
0
       } else {

Comments

    No one has commented yet.