I would like to upload content on a FTP server.
It works, but there is a behaviour I can't understand...

1) uploader.js -> my file, uploads the content in http://foo/bar.html
: OK
2) when I go to http://foo/bar.html (correctly created) I can see the
content I put
3) .... a few minutes later ...
4) no more content ! empty page !

I hear something about a "cache"... Is there something with it ?
Another reason ?


--------- uploader.js (sample of upload () function ------------

const ioService = Components.classes["@mozilla.org/network/io-service;
1"].getService (Components.interfaces.nsIIOService);
const stringStr = Components.classes["@mozilla.org/io/string-input-
stream;1"].createInstance
(Components.interfaces.nsIStringInputStream);
var uri = scheme + "://" + user + ":" + password + "@" + host +
path;
var charset = "UTF-8";
var mimetype = "text/html; charset=UTF-8";
var iUri = ioService.newURI (uri, charset, null);

this._callback = uploadCallback;
this._channel = ioService.newChannelFromURI (iUri)
.QueryInterface (Components.interfaces.nsIUploadChannel);
try
{
stringStr.setData (content, -1);
this._channel.setUploadStream (stringStr, mimetype, -1);
this._channel.asyncOpen (this, null);
this._data = content;
}
catch (error)
{ .. }
},

--
Adrien MOGENET
http://adrien.frenchcomp.net/blog
http://adrien.frenchcomp.net/cv