]> granicus.if.org Git - apache/commitdiff
Feedback appreciated - I'm guessing that we can trust the isapi app
authorWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 4 Jun 2002 02:21:36 +0000 (02:21 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 4 Jun 2002 02:21:36 +0000 (02:21 +0000)
  opened file handles correctly for the TransmitFile case.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95498 13f79535-47bb-0310-9956-ffa450edef68

modules/arch/win32/mod_isapi.c

index 81acc00349a0b44be1a23e79fe33fb97287ca4ce..89b3242e74c42360de508c837634267cb410723b 100644 (file)
@@ -963,7 +963,12 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid    *cid,
             return 0;
         }
         
-        if ((rv = apr_os_file_put(&fd, &tf->hFile, 0, r->pool)) != APR_SUCCESS) {
+        /* Presume the handle was opened with the CORRECT semantics
+         * for TransmitFile 
+         */
+        if ((rv = apr_os_file_put(&fd, &tf->hFile, 
+                                  APR_READ | APR_XTHREAD, r->pool)) 
+                != APR_SUCCESS) {
             return 0;
         }
         if (tf->BytesToWrite) {