head	1.13;
access;
symbols;
locks
	nobody:1.13; strict;
comment	@# @;


1.13
date	99.08.31.16.57.37;	author nobody;	state Exp;
branches;
next	1.12;

1.12
date	99.06.09.05.17.24;	author nobody;	state Exp;
branches;
next	1.11;

1.11
date	99.06.08.03.39.28;	author nobody;	state Exp;
branches;
next	1.10;

1.10
date	99.06.08.03.38.44;	author nobody;	state Exp;
branches;
next	1.9;

1.9
date	99.05.19.19.01.23;	author nobody;	state Exp;
branches;
next	1.8;

1.8
date	99.05.19.15.12.42;	author nobody;	state Exp;
branches;
next	1.7;

1.7
date	99.05.14.21.18.39;	author nobody;	state Exp;
branches;
next	1.6;

1.6
date	99.05.14.21.09.48;	author nobody;	state Exp;
branches;
next	1.5;

1.5
date	99.05.13.17.21.54;	author nobody;	state Exp;
branches;
next	1.4;

1.4
date	99.05.12.21.15.09;	author nobody;	state Exp;
branches;
next	1.3;

1.3
date	99.05.12.21.14.14;	author nobody;	state Exp;
branches;
next	1.2;

1.2
date	99.05.12.21.13.39;	author nobody;	state Exp;
branches;
next	1.1;

1.1
date	99.05.12.21.13.00;	author nobody;	state Exp;
branches;
next	;


desc
@null
@


1.13
log
@null
@
text
@IDependOn-Set: 1
IDependOn-Set: 152
IDependOn-Set: 158
IDependOn-Set: 2
IDependOn-Set: 201
IDependOn-Set: 7
LastModifiedSecs: 936118655
Parent: 7
SequenceNumber: 3
Title: Servlets forbidden when using mod_rewrite?
Part: 0
Author-Set: jon@@working-dogs.com
HideAttributions: 1
LastModifiedSecs: 926543709
Type: monospaced
Lines: 68
----------
From: Frank Flannery <fflanner@@yahoo.com>
To: java-apache-users@@list.working-dogs.com
Subject: servlets forbidden when using rewrite module?
Date: Mon, May 10, 1999, 8:10 PM

I've gotten JServ 1.0b4 working just fine on my linux
redhat 5.2 installation.  I then compiled in the
mod_rewrite package, which also worked.  

My problem is, as soon as I turn the rewrite engine on
(RewriteEngine on) servlets immmediately stop working,
saying that acces to servlet is forbidden.

The servlet engine definitely seems to be running,
since when I access a jsp, it says "access to
/servlets/org.gjt.jsp.JSPServlet is forbidden" 

This is with no RewriteRules, or anything.  simply the
rewrite engine being on.

When I turn it off, servlets work again.

----------
From: Ed Korthof <ed@@cloudfactory.org>
To: Java Apache Users <java-apache-users@@list.working-dogs.com>
Subject: Re: servlets forbidden when using rewrite module?
Date: Wed, May 12, 1999, 2:05 PM

Hiya --

So it is indeed the case that stat was leaving r->finfo in an invalid
state; when I described this & suggested a patch, one of the people in the
Apache Group decided it wasn't a good idea to trust the value in r->finfo
after a failed stat call, and applied the following (related) patch: 

-----
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_request.c,v
  retrieving revision 1.147
  retrieving revision 1.148
  diff -u -r1.147 -r1.148
  --- http_request.c    1999/04/20 23:38:44     1.147
  +++ http_request.c    1999/05/12 16:50:42     1.148
  @@@@ -265,8 +265,12 @@@@
               *cp = '\0';
               return OK;
           }
  +     /* must set this to zero, some stat()s may have corrupted it
  +      * even if they returned an error.
  +      */
  +     r->finfo.st_mode = 0;
   #if defined(ENOENT) && defined(ENOTDIR)
  -        else if (errno == ENOENT || errno == ENOTDIR) {
  +        if (errno == ENOENT || errno == ENOTDIR) {
               last_cp = cp;
   
               while (--cp > path && *cp != '/')
-----

This will be in the next version of Apache; please apply it rather than
the previously posted patch, and if you encounter any problems, drop me a
note.

thanks for the bug report!

Ed

EndPart: 0
Part: 1
Author-Set: tjm@@usa.net
LastModifiedSecs: 936118655
Type: monospaced
Lines: 8
I encountered this too and after scouring the rewrite_mod documentation, found a workaround!

RewriteEngine On
# whoops! with RewriteEngine On, JServ doesn't find about about servlets
# until we poke a hole like so (repeat for all zones):
RewriteRule ^/servlets/.* - [passthrough]
# redirect root to some servlet (requires mod_proxy)
RewriteRule ^/$ /servlets/SomeServlet [proxy]
EndPart: 1
@


1.12
log
@null
@
text
@d7 1
a7 1
LastModifiedSecs: 926543709
d9 1
a9 1
SequenceNumber: 2
d86 14
@


1.11
log
@null
@
text
@d5 1
@


1.10
log
@null
@
text
@a3 1
IDependOn-Set: 187
@


1.9
log
@null
@
text
@d4 1
@


1.8
log
@null
@
text
@a3 1
IDependOn-Set: 177
@


1.7
log
@null
@
text
@d4 1
@


1.6
log
@null
@
text
@a3 1
IDependOn-Set: 162
@


1.5
log
@null
@
text
@d4 1
@


1.4
log
@null
@
text
@d2 1
a2 1
IDependOn-Set: 154
@


1.3
log
@null
@
text
@d6 1
a6 1
LastModifiedSecs: 926543654
d8 1
a8 1
SequenceNumber: 1
d10 75
@


1.2
log
@null
@
text
@d6 1
a6 1
LastModifiedSecs: 926543580
d8 2
a9 2
SequenceNumber: 0
Title: New Item
@


1.1
log
@null
@
text
@d2 1
@
