jcifs-0.9.7 from tgz
authorFelix Schumacher <p0354740@isib001.(none)>
Wed, 6 Aug 2008 14:20:13 +0000 (16:20 +0200)
committerFelix Schumacher <p0354740@isib001.(none)>
Wed, 6 Aug 2008 14:20:13 +0000 (16:20 +0200)
Tue Aug 10 21:25:03 EDT 2004
jcifs-0.9.7 released

It  was  decided that the NTLM HTTP Filter should not set Connection: close
headers,  a  new  SmbFile  constructor has been added and a rogue debugging
statement has been removed.

README.txt
build.xml
src/jcifs/http/NtlmHttpFilter.java
src/jcifs/http/NtlmServlet.java
src/jcifs/http/NtlmSsp.java
src/jcifs/smb/SmbFile.java

index 4eb3921..ee31da1 100644 (file)
@@ -1,3 +1,10 @@
+Tue Aug 10 21:25:03 EDT 2004
+jcifs-0.9.7 released
+
+It  was  decided that the NTLM HTTP Filter should not set Connection: close
+headers,  a  new  SmbFile  constructor has been added and a rogue debugging
+statement has been removed. 
+
 Thu Jul 22 23:06:47 EDT 2004
 jcifs-0.9.6 released
 
index 7f3aa10..17b06a8 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -1,6 +1,6 @@
 <project name="jcifs" default="usage" basedir=".">
 
-    <property name="version" value="0.9.6"/>
+    <property name="version" value="0.9.7"/>
 
     <target name="usage">
         <echo>
@@ -181,8 +181,8 @@ dependencies: Checks that all class dependencies are met.
     <target name="docs">
         <style basedir="docs" destdir="docs" extension=".html" style="plain.xsl"
                 includes="pipes.xml,faq.xml,wins.xml,capture.xml,httpclient.xml,resolver.xml,authhandler.xml,ntlmhttpauth.xml">
-<param name="date" expression="Jul 22, 2004"/>
-<param name="lib" expression="jcifs-0.9.6"/>
+<param name="date" expression="Aug 11, 2004"/>
+<param name="lib" expression="jcifs-0.9.7"/>
 <param name="title" expression="JCIFS"/>
 <param name="copyright" expression="The JCIFS Project"/>
 <param name="edge" expression="#808080"/>
@@ -195,8 +195,8 @@ dependencies: Checks that all class dependencies are met.
         </style>
         <style basedir="docs" destdir="docs" extension=".html" style="proj.xsl"
                 includes="index.xml">
-<param name="date" expression="Jul 22, 2004"/>
-<param name="lib" expression="jcifs-0.9.6"/>
+<param name="date" expression="Aug 11, 2004"/>
+<param name="lib" expression="jcifs-0.9.7"/>
 <param name="title" expression="JCIFS"/>
 <param name="copyright" expression="The JCIFS Project"/>
 <param name="edge" expression="#808080"/>
index 7a064a4..74023b4 100644 (file)
@@ -133,7 +133,6 @@ public class NtlmHttpFilter implements Filter {
                     /* Server challenge no longer valid for
                      * externally supplied password hashes.
                      */
-System.err.println("ACCESS_VIOLATION");
                     HttpSession ssn = req.getSession(false);
                     if (ssn != null) {
                         ssn.removeAttribute( "NtlmHttpAuth" );
@@ -144,7 +143,6 @@ System.err.println("ACCESS_VIOLATION");
                     resp.addHeader( "WWW-Authenticate", "Basic realm=\"" +
                             realm + "\"");
                 }
-                resp.setHeader( "Connection", "close" );
                 resp.setStatus( HttpServletResponse.SC_UNAUTHORIZED );
                 resp.flushBuffer();
                 return;
@@ -159,7 +157,6 @@ System.err.println("ACCESS_VIOLATION");
                     resp.addHeader( "WWW-Authenticate", "Basic realm=\"" +
                             realm + "\"");
                 }
-                resp.setHeader( "Connection", "close" );
                 resp.setStatus( HttpServletResponse.SC_UNAUTHORIZED );
                 resp.flushBuffer();
                 return;
index d379cdd..2db9184 100644 (file)
@@ -158,7 +158,6 @@ public abstract class NtlmServlet extends HttpServlet {
                     response.addHeader("WWW-Authenticate", "Basic realm=\"" +
                             realm + "\"");
                 }
-                response.setHeader("Connection", "close");
                 response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
                 response.flushBuffer();
                 return;
index 146cf5e..d3ba2be 100644 (file)
@@ -100,10 +100,8 @@ public class NtlmSsp implements NtlmFlags {
             }
         } else {
             resp.setHeader("WWW-Authenticate", "NTLM");
-            resp.setHeader("Connection", "close");
         }
         resp.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
-        resp.setContentLength( 0 );
         resp.flushBuffer();
         return null;
     }
index 7bdce21..925964b 100644 (file)
@@ -557,6 +557,34 @@ public class SmbFile extends URLConnection {
     }
 /**
  * Constructs an SmbFile representing a resource on an SMB network such
+ * as a file or directory. The second parameter is a relative path from
+ * the <code>context</code>. See the description above for examples of
+ * using the second <code>name</code> parameter. The <tt>shareAccess</tt>
+ * parameter controls what permissions other clients have when trying
+ * to access the same file while this instance is still open. This
+ * value is either <tt>FILE_NO_SHARE</tt> or any combination
+ * of <tt>FILE_SHARE_READ</tt>, <tt>FILE_SHARE_WRITE</tt>, and
+ * <tt>FILE_SHARE_DELETE</tt> logically OR'd together.
+ *
+ * @param   context A base <code>SmbFile</code>
+ * @param   name A path string relative to the <code>context</code> file path
+ * @param   shareAccess Specifies what access other clients have while this file is open.
+ * @throws  MalformedURLException
+ *          If the <code>context</code> and <code>name</code> parameters
+ *          do not follow the prescribed syntax
+ */
+    public SmbFile( SmbFile context, String name, int shareAccess )
+                    throws MalformedURLException, UnknownHostException {
+        this( context.isWorkgroup0() ?
+            new URL( null, "smb://" + name, Handler.SMB_HANDLER ) :
+            new URL( context.url, name, Handler.SMB_HANDLER ), context.auth );
+        if ((shareAccess & ~(FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE)) != 0) {
+            throw new RuntimeException( "Illegal shareAccess parameter" );
+        }
+        this.shareAccess = shareAccess;
+    }
+/**
+ * Constructs an SmbFile representing a resource on an SMB network such
  * as a file or directory from a <tt>URL</tt> object.
  *
  * @param   url The URL of the target resource