Bugs item #880472, was opened at 2004-01-20 04:12
Message generated for change (Comment added) made by jdhildeb
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=104866&aid=880472&group_id=4866

Category: WebKit
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Christoph Zwerschke (cito)
Assigned to: Jason Hildebrand (jdhildeb)
Summary: Bug in HTTPResponse code

Initial Comment:
In the HTTPResponse module (see
http://webware.sourceforge.net/Webware-
0.8.1/WebKit/Docs/Source/Files/HTTPResponse.py.html)
you will find the following method for flushing the 
response cache

    def flush(self, autoFlush=1):
        """..."""
        if not self._committed:
            self.commit()
        self._strmOut.flush()
        self._strmOut.autoCommit(1)

The last line should be very obviously changed to

        self._strmOut.autoCommit(autoFlush)

Or do I miss something?

I also noticed a problem when I do a flush and a 
forward afterwards. Webware makes the forwarding, but 
somehow the forwarding servlet seems to overwrites 
the servlet to which it forwards in the servlet cache. 
Webware should prohibit forwarding when the response 
is already committed.

----------------------------------------------------------------------

>Comment By: Jason Hildebrand (jdhildeb)
Date: 2004-03-04 12:33

Message:
Logged In: YES 
user_id=173690

Thanks for the test case.  It looks like this code has
changed since Webware 0.8.x, and instead of the
InvalidCommandSequence exception you get an assertion error
earlier in the call sequence.
I was able to confirm that using webware from cvs, servlet a
doesn't "take over" servlet b.

I added some text to make the assertion failure more clear
"Cannot reset response; it has already been sent.", which
will hopefully help the developer in this situation.


----------------------------------------------------------------------

Comment By: Christoph Zwerschke (cito)
Date: 2004-02-05 20:38

Message:
Logged In: YES 
user_id=193957

Find attached a small test case demonstrating the problem.

You can jump between page a and page b via ordinary links, 
and you can make a forward from page a to page b. Withthe 
flush() command commented out in servlet a, everything 
works fine. The response from page a is discarded and you 
see the response from page b. However, with the flush() 
command, you will get an error 
like "InvalidCommandSequence". It is understandable that 
an error is raised, since the response has already been sent 
to the web server and cannot be taken back, but the problem 
is that from now on, servlet b has been taken over by servlet 
a in the servlet cache. Even if you enter the address of 
servlet b or jump to servlet b, you will always get the output 
of servlet a. Things will only become normal again if you 
restart Webware or empty the servlet cache.


----------------------------------------------------------------------

Comment By: Jason Hildebrand (jdhildeb)
Date: 2004-02-04 18:24

Message:
Logged In: YES 
user_id=173690

Ok, I've applied the first bugfix to CVS -- thanks.  

With respect to the second problem, could you whip up a
small test case which demonstrates the problem?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=104866&aid=880472&group_id=4866


-------------------------------------------------------
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
_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to