Changeset 7313


Ignore:
Timestamp:
Mar 28, 2017, 11:50:38 AM (6 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #2067: Download stream from files should be opened before sending metadata to web client

The download stream is now opened earlier and the db.close() was changed to db.commit() so that changes are automatically saved.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.10-stable/src/clients/web/net/sf/basedb/clients/web/servlet/Download.java

    r7159 r7313  
    185185      dc = sc.newDbControl();
    186186      f = File.getByPath(dc, path, false);
     187      in = f.getDownloadStream(startByte);
    187188      // The ETag is used to support pause/resume when downloading
    188189      // Seems to work without it in Firefox but not in IE
     
    222223      response.setHeader("ETag", eTag);
    223224     
    224       in = f.getDownloadStream(startByte);
    225       dc.close();
     225      dc.commit();
    226226      out = response.getOutputStream();
    227227      response.flushBuffer();
Note: See TracChangeset for help on using the changeset viewer.