You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Andreas Ljunggren <an...@ljunggren.net> on 1999/06/10 18:24:52 UTC
mod_jserv/4559: mod_JServ is not mod_proxy aware, patch included
>Number: 4559
>Category: mod_jserv
>Synopsis: mod_JServ is not mod_proxy aware, patch included
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: jserv
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Thu Jun 10 09:30:00 PDT 1999
>Last-Modified:
>Originator: andreas@ljunggren.net
>Organization:
apache
>Release: apache_1.3.6 + ApacheJServ-1.0b5
>Environment:
Solaris 2.6, Java 1.1.3
>Description:
Basicly, if you use Apache as a Proxy AND for servlets/jsp it will
trigger the servlets part for a proxy request, since JServ doesn't check
if it's an proxy request.
>How-To-Repeat:
Mapp http://some.host/proxy/ -> www.apache.org , then do a call for
http://some.host/proxy/somepage.jsp
>Fix:
*** mod_jserv.c Wed May 5 20:04:15 1999
--- mod_jserv.c.new Thu Jun 10 18:14:38 1999
***************
*** 1303,1308 ****
--- 1303,1313 ----
jserv_request *req=NULL;
int x,y;
+ /* If this is a proxy request, then decline to handle it. */
+ if (r->proxyreq) {
+ return NULL;
+ }
+
/* Matching URI and MNT discarding double slashes*/
x=0; y=0;
while ((uri[x]==mnt[y]) && (uri[x]!='\0') && (mnt[y]!='\0')) {
***************
*** 1382,1387 ****
--- 1387,1397 ----
jserv_mount *cur;
jserv_request *result=NULL;
+ /* If this is a proxy request, then decline to handle it. */
+ if (r->proxyreq) {
+ return DECLINED;
+ }
+
/* If we didn't get our server config we'll decline the request*/
if (cfg==NULL) return DECLINED;
***************
*** 1419,1424 ****
--- 1429,1438 ----
char *file=NULL;
char *ext=NULL;
+ /* If this is a proxy request, then decline to handle it. */
+ if (r->proxyreq) {
+ return DECLINED;
+ }
/* Check filename */
if (r->filename==NULL) return DECLINED;
file=strrchr(r->filename, '/');
***************
*** 1471,1476 ****
--- 1485,1494 ----
jserv_protocol *proto=NULL;
int ret;
+ /* If this is a proxy request, then decline to handle it. */
+ if (r->proxyreq) {
+ return DECLINED;
+ }
/* If this was an internal redirection from Apache JServ then our path_info is
previous uri */
if (r->prev!=NULL)
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <ap...@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or ]
["Re: general/1098:"). If the subject doesn't match this ]
[pattern, your message will be misfiled and ignored. The ]
["apbugs" address is not added to the Cc line of messages from ]
[the database automatically because of the potential for mail ]
[loops. If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request from a ]
[developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]