can i get a +1 on this change?

-jon

-- 
Come to the first official Apache Software Foundation
Conference!  <http://ApacheCon.Com/>


----------
From: Jon Smirl <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: 20 Dec 1999 19:20:05 -0000
To: [EMAIL PROTECTED]
Subject: mod_jserv/5498: Pages being returned are empty


>Number:         5498
>Category:       mod_jserv
>Synopsis:       Pages being returned are empty
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jserv
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Dec 20 11:30:01 PST 1999
>Last-Modified:
>Originator:     [EMAIL PROTECTED]
>Organization:
apache
>Release:        1.3.9 1.1b3
>Environment:
Win95, MS JVM
>Description:
I can watch my servlet write data into the output stream, but this data is
not being flushed form JServ to Apache. Should out.close() in
JServConnection.java be servlet_out.close() instead? Switch this fixes my
problem. 

> From JServConnection.java...

                if (servlet_writer != null) {
                    servlet_writer.close();
                }
                out.close;

change to:
                if (servlet_writer != null) {
                    servlet_writer.close();
                } else
                    servlet_out.close();
  
Why is this loop needed in the JServOutputStream close function?

        public void close() throws IOException {
            int l;
            do {
                l = in.available();
                in.skip(l);
            } while (l > 0);
            
            sendHttpHeaders();
            out.close();

The page that is giving me trouble has data available on it.

Jon Smirl
[EMAIL PROTECTED]




>How-To-Repeat:

>Fix:
> From JServConnection.java...

                if (servlet_writer != null) {
                    servlet_writer.close();
                }
                out.close;

change to:
                if (servlet_writer != null) {
                    servlet_writer.close();
                } else
                    servlet_out.close();
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <[EMAIL PROTECTED]> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or      ]
["Re: general/1098:").  If the subject doesn't match this       ]
[pattern, your message will be misfiled and ignored.  The       ]
["apbugs" address is not added to the Cc line of messages from  ]
[the database automatically because of the potential for mail   ]
[loops.  If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request from a  ]
[developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]






--
----------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to