juergen 2002/08/09 00:14:49
Modified:
testsuite/testsuite/junit/src/org/apache/slide/testsuite/testtools/tprocessor
TProcessors.java
Log:
check if the file exists at a PUT command with file reference.
Revision Changes Path
1.34 +5 -4
jakarta-slide/testsuite/testsuite/junit/src/org/apache/slide/testsuite/testtools/tprocessor/TProcessors.java
Index: TProcessors.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/testsuite/testsuite/junit/src/org/apache/slide/testsuite/testtools/tprocessor/TProcessors.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- TProcessors.java 8 Aug 2002 16:27:25 -0000 1.33
+++ TProcessors.java 9 Aug 2002 07:14:48 -0000 1.34
@@ -861,6 +861,7 @@
private HttpMethod fillBody (Element element, HttpMethod method) throws
Exception {
if (method instanceof PutMethod && binaryReadRequest(element)) {
File input = new File(getFileReferenceName(element));
+ if (!input.exists()) throw new Exception("File " +
getFileReferenceName(element) + " does not exist");
method.setHeader("Content-Length", ""+input.length());
((PutMethod)method).sendData(input);
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>