Reading Content-Disposition header in flow.

View: New views
1 Messages — Rating Filter:   Alert me  

Reading Content-Disposition header in flow.

by Tomek Piechowicz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi
I have simple form with file upload widget. I need to read
'Content-Disposition' http header, but I don`t know how to do it. I
tried to use cocoon.request functions but they doesn`t work.

My upload function :
function Fup()
{
        form = new Form("resource/internal/test/fup_model.xml");
        form.createBinding("resource/internal/test/fup_binding.xml");
        form.showForm("fup-display-pipeline");
       
        // reading http header
        var contDisp = cocoon.request.getAttribute('Content-Disposition');
       
        // my own java object that writes text to console
        console.println('contDisp = ' + contDisp);
       
        cocoon.redirectTo("fup", true);
}

After I upload some file function writes to console : contDisp = null

I tried also to read different http headers like : Content-Type or
Content-Length - but getAttribute() always returns null.
Interestingly, when I use request.getContentType() or
request.getContentLength() - this functions works well.

Can any one tell me what I`m doing wrong ? How to read any http-header
in flow function ?

Regards,
Tomek Piechowicz

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...