The problem comes in that for some reason Firefox does not sent the DomAuthSessId cookie over in the header.. for example here is a header receieved from FLEX from an authenticated session using the FLEX HTTPRequest object.
*** New Request -- Parse and Check Request: Session 7, Thread 1ba4, Clock 1602816
GET /econtent/AC_OETags.js HTTP/1.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:184.108.40.206) Gecko/2009101601 Firefox/3.0.15 (.NET CLR 3.5.30729)
If-Modified-Since: Thu, 05 Nov 2009 00:07:20 GMT
and here is the next header received by the server from FLEX again running on Firefox in the same session using the FileReference.upload() method
*** New Request -- Parse and Check Request: Session 8, Thread 7c4, Clock 1617184As you can see no DomAuthSessId.. and what happens well the Domino Server does what it is meant to do, it sends back the Logon screen to the Flex program. In case you are wondering this data was obtained from my server using the following Server Console commands prior to test running the FLEX
POST /econtent.nsf/Gallery?createDocument HTTP/1.1
Content-Type: multipart/form-data; boundary=----------GI3ae0Ij5gL6ei4KM7GI3ae0Ef1ei4
User-Agent: Shockwave Flash
tell http debug thread on | off (default level)Now this is a major FUBAR and it is odd to be complaining about FF and not IE but there you go. It seems FF starts an entirely new browser instance to do the FileReference.upload() hence the no DomAuthSessId being passed.
tell http debug postdata on | off (for client POST data)
tell http debug responsedata on | off (for server response data)
However all is not lost you think, the FileReference takes a URLRequest object and it has the ability to be coded to load the Header with values should you need them. Well yes it does and you can set any number of values in the URLRequest object BUT and it is a bigh BUT Flex ignores them, so there is no way out that way!.
Nothing I have tried to date allows me to use the pre-authentication of the browser instance my flex is running in to send a file to the server via the FileReference object. FECK! and yet it works perfectly in IE8 (a fact which is particularly galling) it is FireFox (and from my testing Safari) that are the problems on this occasion and it holds true for Flex 3 and Flex 4 and from my browsing of the Adobe site not likely to be acknowledged as a problem let alone fixed any time soon.
So far the only work around I can come up with is to spawn out to a standard browser child window upload the file there using a Domino File Upload control and then use an external JS function to talk to the parent flex program when the file sucessfully uploads.. which is a bloody pain in the arse!
The whole situation is not helped by the Domino server not liking a standard POST method of getting data from the client to the server..
Anyway there you go .. back to the head scratching