jicarilla-sandbox/platform/components/http/impl/src/java/org/jicarilla/http HTTPMessageGenerator.java,1.6,1.7 HTTPParserImpl.java,1.7,1.8

Leo Simons <[email protected]>
Newsgroups gmane.comp.java.jicarilla.cvs
Message-ID <[email protected]>
Update of /cvsroot/jicarilla/jicarilla-sandbox/platform/components/http/impl/src/java/org/jicarilla/http
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18015/platform/components/http/impl/src/java/org/jicarilla/http

Modified Files:
	HTTPMessageGenerator.java HTTPParserImpl.java 
Log Message:
Javadocs for the parser, and starting support for chunked transfer coding (currently still disabled and untested though). Boy, is HTTPParserImpl turning big :-D

Index: HTTPMessageGenerator.java
===================================================================
RCS file: /cvsroot/jicarilla/jicarilla-sandbox/platform/components/http/impl/src/java/org/jicarilla/http/HTTPMessageGenerator.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- HTTPMessageGenerator.java	23 Mar 2004 13:37:49 -0000	1.6
+++ HTTPMessageGenerator.java	31 Mar 2004 19:42:53 -0000	1.7
@@ -26,9 +26,9 @@
 package org.jicarilla.http;
 
 import org.apache.commons.pool.ObjectPool;
+import org.jicarilla.http.util.NioUtil;
 import org.jicarilla.lang.Assert;
 import org.jicarilla.lang.ExceptionListener;
-import org.jicarilla.http.util.NioUtil;
 
 import java.nio.ByteBuffer;
 import java.util.Iterator;
@@ -243,6 +243,12 @@
         getMessage().setComplete( true );
     }
 
+    public boolean hasTrailers()
+    {
+        // todo
+        return false;
+    }
+
     // ----------------------------------------------------------------------
     //  Work Interface: HTTPErrorHandler
     // ----------------------------------------------------------------------

Index: HTTPParserImpl.java
===================================================================
RCS file: /cvsroot/jicarilla/jicarilla-sandbox/platform/components/http/impl/src/java/org/jicarilla/http/HTTPParserImpl.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- HTTPParserImpl.java	23 Mar 2004 13:37:49 -0000	1.7
+++ HTTPParserImpl.java	31 Mar 2004 19:42:53 -0000	1.8
@@ -25,15 +25,25 @@
 ==================================================================== */
 package org.jicarilla.http;
 
-import org.jicarilla.lang.Assert;
 import org.jicarilla.http.util.Iso646;
+import org.jicarilla.lang.Assert;
 
 import java.nio.ByteBuffer;
 
 /**
- * A component that understands HTTP. Fires off events to a
[...1064 lines suppressed...]
-            if( state < LOOKING_FOR_BODY )
+            if( state < LOOKING_FOR_BODY || state >= LOOKING_FOR_TRAILER )
             {
                 if( bufferSize > MAX_BUFFER_SIZE )
                 {
@@ -947,5 +1461,14 @@
             }
         }
 
+        public void foundChunkSize( ByteBuffer size )
+        {
+            // todo: support chunked transfer coding
+            
+            // 1) check buffer is not empty
+            // 2) parse buffer into integer
+            // 3) set chunkSizeLeft
+        }
+
     }
 }



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.