Author: hqm
Date: 2008-02-19 12:40:46 -0800 (Tue, 19 Feb 2008)
New Revision: 8062
Modified:
openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/data/XMLGrabber.java
Log:
Change 20080219-hqm-D by [EMAIL PROTECTED] on 2008-02-19 15:39:03 EST
in /Users/hqm/openlaszlo/trunk/WEB-INF/lps/server/src
for http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/server/src
Summary: make sure LPS server data proxy will close http connection if
errors occur
New Features:
Bugs Fixed: LPP-5440
Technical Reviewer: max
QA Reviewer: pkang
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
If an ill-formed or empty document causes an error in the XML proxy
server, it can
leave the HTTP connection open, causing hangs on the client.
This forces the stream to close on any error.
I don't know how to easily throw an error asynchronously to the parent
thread in Java, so we are just closing the connection for now.
Tests:
see bug report for test case
Modified:
openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/data/XMLGrabber.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/data/XMLGrabber.java
2008-02-19 18:03:01 UTC (rev 8061)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/data/XMLGrabber.java
2008-02-19 20:40:46 UTC (rev 8062)
@@ -8,7 +8,7 @@
* ****************************************************************************/
/* J_LZ_COPYRIGHT_BEGIN *******************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* J_LZ_COPYRIGHT_END *********************************************************/
@@ -147,12 +147,13 @@
public void run() {
try {
writeXMLDataToOutputStream();
- pout.flush();
- pout.close();
- } catch (XmlPullParserException ex) {
- throw new RuntimeException(ex);
- } catch (IOException ex) {
- throw new RuntimeException(ex);
+ } catch (Exception e) {
+ } finally {
+ try {
+ pout.flush();
+ pout.close();
+ } catch (Exception e) {
+ }
}
}
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins