Opened 10 years ago
Closed 9 years ago
#910 closed defect (fixed)
WCS ProcessRequest does not work on Webkit browsers
Reported by: | Alex Dumitru | Owned by: | Bang Pham Huu |
---|---|---|---|
Priority: | major | Milestone: | 9.2 |
Component: | undecided | Version: | development |
Keywords: | Cc: | ||
Complexity: | Medium |
Description
No response is received by the browser. This seems to be due to incorrect used of multipart response in petascope interface.
Change History (9)
comment:1 by , 9 years ago
Milestone: | → 9.2 |
---|
comment:2 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 9 years ago
Bang your patch is not valid, Alex pointed out that "IOUtils.close() calls flush() and then close(). Calling them once more is undefined behaviour and can lead to bugs."
comment:5 by , 9 years ago
@Dimitar: I copy the command from
http://rasdaman.org/browser/applications/petascope/src/main/java/petascope/PetascopeInterface.java#L680
but as Alex has pointed out in Java close() also invoke flush() so don't need flush() anymore. I will make a patch that eliminate the above line also. Thanks.
comment:8 by , 9 years ago
@Bang
+ IOUtils.closeQuietly(os); + if (os != null) { + os.close(); + }
should be
+ IOUtils.closeQuietly(os);
IOUtils.closeQuietly(os) is defined as {try{os.flush(); os.close()} catch(Exception e) {}}. As you can see, it already closes the stream, so closing once more or doing any operation on it is undefined behavior (it can just return or it can crash). So there's no need for the if statment. The same holds for the other lines.
comment:9 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
As this patch has been accepted, I would close the ticket and thanks for Alex with your careful reviewing in times.