W3C home > Mailing lists > Public > www-jigsaw@w3.org > November to December 1996

HttpParserException: End Of File

From: <orjan@spinne.ip.lu>
Date: Mon, 30 Dec 1996 12:39:52 +0000
Message-Id: <m0veg2w-000DN2C@spinne.ip.lu>
To: www-jigsaw@www10.w3.org
Hi there!

I'v been jusing the Jigsaw class framework for some time now in my 
own little HTTP server project, but lately I'v run into some bizarre 
problems (and I have a feeling that my problems might not be linked 
to the Jigsaw classes but to bugs in Java itself, but anyway!!)

Here's the situation (very simplified):

I have a normal sever situation and I'm using the w3.www.MimeParser 
class to parse the client request (I should also point out that this 
is in a single threaded sceeenarion; handling of the request is done 
directly after and in the same thread as receiving the connection).

    try { 
         clisock = servsock.accept();
    } catch (IOException ex) {  
         // Handle Exception ...
    }

   try { 
        in = new DataInputStream(clisock.getInputStream());
        out = new PrintStream(clisock.getOutputStream());
   } catch (IOException ex) {
         // Handle Exception ...
   }

   try {
        MimeClientFactory factory = new MimeClientFactory();
        MimeParser parser = new MimeParser(in, factory);           
        ClientRequest req = (ClientRequest) parser.parse();
   } catch (IOException ex) {
        // Handle Exception ...
   } catch (MimeParserException ex) {
        // Handle Exception ...
   }

   MimeClientFactory implements MimeParserFactory and ClientRequest 
   is basically a HttpRequestMessage.

Now, when I use a Netsacpe browser and resize a page retrived from my 
simplistic server, Netscape generates a request that in the best case 
generates a HttpParserException (End Of File) in my server. In the  
worst case the whole excution is blocked infinitely in the request 
parsing step WITHOUT generation any exceptions or errors!! This is 
really bad news in a single threaded server scheme! In a multi-
threaded server scheme (like Jigsaw) it might be bad news as well 
since it might create zombie threads.

An other thing I observer is that it seems to be only Netscape who is 
able to break my server this way. With MSIE everything runs smoothly.

So am I completely of course or has anyone experienced anything 
similar???

Happy for any answer that might help me!!

Cheers,
Orjan Reinholdsen







================================================================================
 Orjan Reinholdsen                                      Infopartners SA 
 Voice: +352 29 57 59 33 02                             Fax: +352 29 57 59 39 00
 e-mail: orjan@ip.lu
================================================================================
Received on Monday, 30 December 1996 06:38:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:25 GMT