Changeset 867
- Timestamp:
- 2008-03-09 01:29:48 (9 months ago)
- Files:
-
- trunk/chrome/content/dta/manager.js (modified) (6 diffs)
- trunk/chrome/content/dta/manager/sessionmanager.js (modified) (1 diff)
- trunk/components/contentHandling.js (added)
- trunk/components/contenthandling.idl (added)
- trunk/components/contenthandling.xpt (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/chrome/content/dta/manager.js
r862 r867 61 61 const BinaryInputStream = Construct('@mozilla.org/binaryinputstream;1', 'nsIBinaryInputStream', 'setInputStream'); 62 62 const FileInputStream = Construct('@mozilla.org/network/file-input-stream;1', 'nsIFileInputStream', 'init'); 63 63 const StringInputStream = Construct('@mozilla.org/io/string-input-stream;1', 'nsIStringInputStream', 'setData'); 64 65 const ContentHandling = Serv('@downthemall.net/contenthandling;1', 'dtaIContentHandling'); 64 66 const MimeService = Serv('@mozilla.org/uriloader/external-helper-app-service;1', 'nsIMIMEService'); 65 67 const ObserverService = Serv('@mozilla.org/observer-service;1', 'nsIObserverService'); … … 900 902 }, 901 903 904 postData: null, 905 902 906 _fileName: null, 903 907 get fileName() { … … 1617 1621 [ 1618 1622 'fileName', 1623 'postData', 1619 1624 'numIstance', 1620 1625 'description', … … 1865 1870 } 1866 1871 try { 1867 varhttp = this._chan.QueryInterface(Ci.nsIHttpChannel);1872 let http = this._chan.QueryInterface(Ci.nsIHttpChannel); 1868 1873 if (c.start + c.written > 0) { 1869 1874 http.setRequestHeader('Range', 'bytes=' + (c.start + c.written) + "-", false); … … 1874 1879 http.setRequestHeader('Keep-Alive', '', false); 1875 1880 http.setRequestHeader('Connection', 'close', false); 1881 if (d.postData) { 1882 let uc = http.QueryInterface(Ci.nsIUploadChannel); 1883 uc.setUploadStream(new StringInputStream(d.postData, d.postData.length), null, -1); 1884 http.requestMethod = 'POST'; 1885 } 1876 1886 } 1877 1887 catch (ex) { 1878 1888 Debug.log("error setting up channel", ex); 1889 // no-op 1879 1890 } 1880 1891 this.c.running = true; … … 2495 2506 d.hash = null; // to initialize prettyHash 2496 2507 } 2508 try { 2509 d.postData = ContentHandling.getPostDataFor(d.urlManager.url.toURI()); 2510 } 2511 catch (ex) { 2512 Debug.log("No post data for me: " + d.urlManager.url, ex); 2513 // no-op 2514 } 2497 2515 d.state = start ? QUEUED : PAUSED; 2498 2516 if (d.is(QUEUED)) { trunk/chrome/content/dta/manager/sessionmanager.js
r795 r867 255 255 'conflicts', 256 256 'fileName', 257 'postData', 257 258 'destinationName', 258 259 'resumable',
