tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Priest <Robert.Pri...@bentley.com>
Subject RE: ISAPI Filter and OPTIONS Dav Method.
Date Wed, 01 May 2002 15:46:25 GMT


-----Original Message-----
From: Robert Priest [mailto:Robert.Priest@bentley.com]
Sent: Wednesday, May 01, 2002 10:03 AM
To: 'tomcat-user@jakarta.apache.org'
>Just to test what would happen, I hacked the HttpFilterProc method to to
>catch when an OPTIONS request is received and return 
>a OPTIONS response.

In case you are curious, here is the code I call in HttpFilterProc() when
it sees that method == "OPTIONS" 
to force an OPTIONS response back down to the client:

static void write_options_response(PHTTP_FILTER_CONTEXT pfc)
{
    	char crlf[3] = { (char)13, (char)10, '\0' };
      static const char ops[] = "OPTIONS, GET, HEAD, POST, DELETE, TRACE,
PROPFIND, PROPPATCH, COPY, MOVE, LOCK, UNLOCK";
	//char server[30];
	int opslen = strlen(ops);
	char allow[255];
	sprintf(allow, 
          "%s%s%s%s",
	    "Allow: ",
		ops,
            crlf, 
            crlf);
 
    /* send options back down */
	pfc->AddResponseHeaders(pfc,
							  "Content-Length:
0\r\n",
							   0
						 	   );
      pfc->AddResponseHeaders(pfc,
							  "Cache-Control:
no-cache\r\n",
							   0
						 	   );
	 pfc->AddResponseHeaders(pfc,
							  "MS-Author-Via:
DAV\r\n",
							   0
								);
	 pfc->AddResponseHeaders(pfc,
							  "DAV: 1, 2, slide,
access-control\r\n",
							   0
						 	   );

	 pfc->AddResponseHeaders(pfc,
							  allow,
							   0
						 	   );
	
	pfc->ServerSupportFunction(pfc, 
                               SF_REQ_SEND_RESPONSE_HEADER,
                               NULL,
					 (DWORD)crlf,
                               (DWORD)crlf);
   
}


Subject: ISAPI Filter and OPTIONS Dav Method.


Using: 
Tomcat 4.0.3.
Slide 1.0.16.
ISAPI Filter from J-T-C
WebDrive 5.1 (Client)
IIS 5.0

I have been having an issue where the ISAPI Filter dies whenever receiving
an OPTIONS request.
It looks like HttpFilterProc gets called and does it work, but somewhere
between IIS doing something and the
call to HttpExtensionProc, the server sends back a "500 Internal Server
Error"

Does anyone have any idea what may be going on.


Just to test what would happen, I hacked the HttpFilterProc method to to
catch when an OPTIONS request is received and return 
a OPTIONS response.  I made the HttpFilterProc method, at that point, return
with a "SF_STATUS_REQ_FINISHED". With that, I can connect to the server and
get a list of folders and files through the client. I can even copy out from
the client to my desktop. However, I do encounter another "500 Internal
Server Error" when I attempt a "PUT" (to add a file). 

I say that to say this: there is obviously a problem in the filter with it
not passing headers (the method in particular) back to IIS or from IIS to
the
HttpExtensionProc method. As I am not that proficient is IIS dev soI have
not  a clue what is happening. Is an IIS  header missing or something?

Can anyone aid here, so that I do not have to continue to hack it to get it
to work?


The request never goes as far as to get passed on to tomcat. The
communication (when the problem occurs), is only between IIS and the
isapi_redirect.dll.

I don't think the AJP 13 Connector even comes into play at this point. Can
someone verify that for me?

Is this the correct "chain"  for the request:

IIS -> filter ->IIS -> extension -> AJP13 Connector -> Tomcat -> Web
Application (in this case: slide 1.0.16)




--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message