just comments
authormh <mh>
Wed, 17 Oct 2001 19:38:08 +0000 (19:38 +0000)
committermh <mh>
Wed, 17 Oct 2001 19:38:08 +0000 (19:38 +0000)
source/mircoders/servlet/ServletModuleOpenIndy.java

index 6bd741d..ad77a2e 100755 (executable)
@@ -220,6 +220,12 @@ public class ServletModuleOpenIndy extends ServletModule
       theLog.printDebugInfo("id: "+cid);
       //insert was not successfull
       if(cid==null){
+        //How do we know that it was not succesful cause of a 
+        //dupe, what if it failed cause of "No space left on device"?
+        //Or is there something I am missing? Wouldn't it be better
+        //to have an explicit dupe check and then insert? I have no
+        //idea what I am talking about. this comment is in case
+        //I forget to explicitely ask. -mh
         deliver(req, res, mergeData, postingFormDupeTemplate);
       }
 
@@ -239,12 +245,13 @@ public class ServletModuleOpenIndy extends ServletModule
       for(Iterator it = mp.requestList.iterator(); it.hasNext();){
         MpRequest mpReq = (MpRequest)it.next();
         String fileName = mpReq.getFilename();
+
         //This is just a temporary way to get the content-type via
         //the .extension , we need to use a magic method, by looking
-        //at the header (first few bytes) of the file. -mh
-        //the Oreilly method sucks cause it rely's on the what
+        //at the header (first few bytes) of the file.
+        //the Oreilly method sucks cause it relies on the
         //content-type the client browser sends and that's
-        //too often application-octet stream.
+        //too often application-octet stream. -mh
         String contentType = FileUtil.guessContentTypeFromName(fileName);
         HashMap mediaValues = new HashMap();
 
@@ -253,7 +260,7 @@ public class ServletModuleOpenIndy extends ServletModule
         //The map file should be Mir/content-types.properties, it's the 
         //default Sun Java file+ some entries that it did not have.
         //so if you support a new media type you have to make sure that
-        //it is in this file
+        //it is in this file -mh
         if ((contentType==null) || (contentType=="application/octet-stream")) {
           throw new ServletModuleException("ModuleException: One or more files of unrecognized types");
         }
@@ -308,8 +315,8 @@ public class ServletModuleOpenIndy extends ServletModule
                 //save and store the media data/metadata
                 mediaHandler.set(mpReq.getMedia(), mediaEnt,mediaTypesList.elementAt(0));
 
-                //were done with mpReq at this point, dereference it. as it contains
-                //mucho mem. -mh 01.10.2001
+                //were done with mpReq at this point, dereference it.
+                //as it contains mucho mem. -mh 01.10.2001
                 mpReq=null;
               
               if(mediaId!=null){