View | Details | Raw Unified | Return to bug 59859
Collapse All | Expand All

(-)java/org/apache/catalina/servlets/WebdavServlet.java (-3 / +6 lines)
Lines 28-33 Link Here
28
import java.util.Stack;
28
import java.util.Stack;
29
import java.util.TimeZone;
29
import java.util.TimeZone;
30
import java.util.Vector;
30
import java.util.Vector;
31
import java.io.InputStream;
31
32
32
import javax.servlet.RequestDispatcher;
33
import javax.servlet.RequestDispatcher;
33
import javax.servlet.ServletContext;
34
import javax.servlet.ServletContext;
Lines 1633-1639 Link Here
1633
     * @param dest Destination path
1634
     * @param dest Destination path
1634
     */
1635
     */
1635
    private boolean copyResource(Hashtable<String,Integer> errorList,
1636
    private boolean copyResource(Hashtable<String,Integer> errorList,
1636
            String source, String dest) {
1637
            String source, String dest) 
1638
            throws IOException {
1637
1639
1638
        if (debug > 1)
1640
        if (debug > 1)
1639
            log("Copy: " + source + " To: " + dest);
1641
            log("Copy: " + source + " To: " + dest);
Lines 1676-1687 Link Here
1676
                    }
1678
                    }
1677
                }
1679
                }
1678
            }
1680
            }
1679
            if (!resources.write(dest, sourceResource.getInputStream(),
1681
            InputStream sourceInputStream = sourceResource.getInputStream();
1680
                    false)) {
1682
            if (!resources.write(dest, sourceInputStream, false)) {
1681
                errorList.put(source,
1683
                errorList.put(source,
1682
                        Integer.valueOf(WebdavStatus.SC_INTERNAL_SERVER_ERROR));
1684
                        Integer.valueOf(WebdavStatus.SC_INTERNAL_SERVER_ERROR));
1683
                return false;
1685
                return false;
1684
            }
1686
            }
1687
            sourceInputStream.close();
1685
        } else {
1688
        } else {
1686
            errorList.put(source,
1689
            errorList.put(source,
1687
                    Integer.valueOf(WebdavStatus.SC_INTERNAL_SERVER_ERROR));
1690
                    Integer.valueOf(WebdavStatus.SC_INTERNAL_SERVER_ERROR));

Return to bug 59859