Re: Problem invoking CGIs that are EXE files

2002-10-08 Thread Jason Young

As I mentioned before, I am able to get the CGI to execute merely by 
changing the file extension to something more unix-friendly (.exe -- 
.sh). Sorry, I have not tried includes to know if it works consistently 
or not.

--jason

Stephan Orme wrote:

I posted something on this earlier - can you get *any* cgi to work when it's
included?

Here's my previous post:

I'm using Tomcat 4.0.3 to serve dynamic and static pages. I can get includes
to work and I can get CGI's to work but I can't get included CGI's to work.
you can pick your friends, you can pick your nose...
Anyway, here's what works:

includes on .html pages:
!--#include virtual=Shared/footer--

includes on .jsp pages:
%@ include file=Shared/footer %

CGI that works:
http://localhost/PCW/cgi-bin/test-cgi

And here's what DOESN'T work (this is on a .html page)
!--#include virtual=/cgi-bin/test-cgi--
!--#include virtual=/PCW/cgi-bin/test-cgi--
!--#include virtual=../../WEB-INF/cgi/test-cgi--

My Tomcat config file is completely standard - I uncommented the SSI and CGI
bits and renamed the appropriate .jar files but there are no other config
changes. Since both CGI's and includes work my assumption here is that the
SSI servlet doesn't call the CGI servlet. In other words when I call the CGI
from the URL it gets handled by the CGI servlet, and when I include it it
gets handled by the SSI servlet but what I need is for the SSI servlet to
call the CGI servlet which it doesn't do.


  

It doesn't appear that any file extensions are checked by the CGI
servlet, and I cannot find any code that explicitly 'allows' or 'denies'
certain file extensions.

As far as I can tell, the request for /cgi-bin/whatever.exe is not
being handled by the CGIServlet at all. When CGIServlet is invoked, it
tries to find the cgi file, and prints logs so you can tell this is
happening. A request for an .exe file does not cause this log to get
printed. So this tells me that the request is never getting sent to the
CGIServlet, even though it matches the /cgi-bin/* pattern, which the
CGIServlet is supposed to handle.

--jason


Turner, John wrote:



.exe may not be explicitly excluded as an extension, but are other file
extensions explicitly included?  Like .sh, .pl, .cgi?

John

 

  

-Original Message-
From: Jason Young [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 11:00 AM
To: [EMAIL PROTECTED]
Subject: Problem invoking CGIs that are EXE files


   



...snip...

 

  

Are there just some file extensions that Tomcat will not try
to execute? 
I looked at the source code, and couldn't find any reference
to .exe 
files that would exclude them from execution...

Thanks for any help or insight into this matter!

Jason Young




  



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Problem invoking CGIs that are EXE files

2002-10-05 Thread Stephan Orme

I posted something on this earlier - can you get *any* cgi to work when it's
included?

Here's my previous post:

I'm using Tomcat 4.0.3 to serve dynamic and static pages. I can get includes
to work and I can get CGI's to work but I can't get included CGI's to work.
you can pick your friends, you can pick your nose...
Anyway, here's what works:

includes on .html pages:
!--#include virtual=Shared/footer--

includes on .jsp pages:
%@ include file=Shared/footer %

CGI that works:
http://localhost/PCW/cgi-bin/test-cgi

And here's what DOESN'T work (this is on a .html page)
!--#include virtual=/cgi-bin/test-cgi--
!--#include virtual=/PCW/cgi-bin/test-cgi--
!--#include virtual=../../WEB-INF/cgi/test-cgi--

My Tomcat config file is completely standard - I uncommented the SSI and CGI
bits and renamed the appropriate .jar files but there are no other config
changes. Since both CGI's and includes work my assumption here is that the
SSI servlet doesn't call the CGI servlet. In other words when I call the CGI
from the URL it gets handled by the CGI servlet, and when I include it it
gets handled by the SSI servlet but what I need is for the SSI servlet to
call the CGI servlet which it doesn't do.


 It doesn't appear that any file extensions are checked by the CGI
 servlet, and I cannot find any code that explicitly 'allows' or 'denies'
 certain file extensions.
 
 As far as I can tell, the request for /cgi-bin/whatever.exe is not
 being handled by the CGIServlet at all. When CGIServlet is invoked, it
 tries to find the cgi file, and prints logs so you can tell this is
 happening. A request for an .exe file does not cause this log to get
 printed. So this tells me that the request is never getting sent to the
 CGIServlet, even though it matches the /cgi-bin/* pattern, which the
 CGIServlet is supposed to handle.
 
 --jason
 
 
 Turner, John wrote:
 
 .exe may not be explicitly excluded as an extension, but are other file
 extensions explicitly included?  Like .sh, .pl, .cgi?
 
 John
 
  
 
 -Original Message-
 From: Jason Young [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 18, 2002 11:00 AM
 To: [EMAIL PROTECTED]
 Subject: Problem invoking CGIs that are EXE files
 
 

 
 
 ...snip...
 
  
 
 Are there just some file extensions that Tomcat will not try
 to execute? 
 I looked at the source code, and couldn't find any reference
 to .exe 
 files that would exclude them from execution...
 
 Thanks for any help or insight into this matter!
 
 Jason Young


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Problem invoking CGIs that are EXE files

2002-09-18 Thread Jason Young

I have Tomcat 4.0.3 installed on a Solaris 8 box, and have been trying 
to set up the CGI functionality. I have a 3rd party web application that 
has binary executables, all of which are named filename.exe. Don't get 
me started on why a unix binary would have an .exe file extension...

The problem is that Tomcat is always returning the binary to the 
browser, instead of executing it. Simply changing the extension of the 
binary to .sh (renaming the binary) will cause Tomcat to actually 
execute it. However, I would like to not have to modify this 3rd party 
app, since much of their HTML references these cgi's...

I cannot see a difference in my configuration that would cause Tomcat to 
work correctly with .sh files, and not .exe files. My cgi servlet 
mapping should be causing the execution of all files that match the 
/cgi-bin/* pattern.

Are there just some file extensions that Tomcat will not try to execute? 
I looked at the source code, and couldn't find any reference to .exe 
files that would exclude them from execution...

Thanks for any help or insight into this matter!

Jason Young

Inet Technologies, Inc.
1500 N Greenville Ave
Richardson, TX 75081


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Problem invoking CGIs that are EXE files

2002-09-18 Thread Turner, John


.exe may not be explicitly excluded as an extension, but are other file
extensions explicitly included?  Like .sh, .pl, .cgi?

John

 -Original Message-
 From: Jason Young [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 18, 2002 11:00 AM
 To: [EMAIL PROTECTED]
 Subject: Problem invoking CGIs that are EXE files
 
 

...snip...

 Are there just some file extensions that Tomcat will not try 
 to execute? 
 I looked at the source code, and couldn't find any reference 
 to .exe 
 files that would exclude them from execution...
 
 Thanks for any help or insight into this matter!
 
 Jason Young
 
 Inet Technologies, Inc.
 1500 N Greenville Ave
 Richardson, TX 75081
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Problem invoking CGIs that are EXE files

2002-09-18 Thread Jason Young

It doesn't appear that any file extensions are checked by the CGI 
servlet, and I cannot find any code that explicitly 'allows' or 'denies' 
certain file extensions.

As far as I can tell, the request for /cgi-bin/whatever.exe is not 
being handled by the CGIServlet at all. When CGIServlet is invoked, it 
tries to find the cgi file, and prints logs so you can tell this is 
happening. A request for an .exe file does not cause this log to get 
printed. So this tells me that the request is never getting sent to the 
CGIServlet, even though it matches the /cgi-bin/* pattern, which the 
CGIServlet is supposed to handle.

--jason


Turner, John wrote:

.exe may not be explicitly excluded as an extension, but are other file
extensions explicitly included?  Like .sh, .pl, .cgi?

John

  

-Original Message-
From: Jason Young [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 11:00 AM
To: [EMAIL PROTECTED]
Subject: Problem invoking CGIs that are EXE files





...snip...

  

Are there just some file extensions that Tomcat will not try 
to execute? 
I looked at the source code, and couldn't find any reference 
to .exe 
files that would exclude them from execution...

Thanks for any help or insight into this matter!

Jason Young

Inet Technologies, Inc.
1500 N Greenville Ave
Richardson, TX 75081


--
To unsubscribe, e-mail:   


mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


  



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]