You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tomasz Piechowicz <to...@gmail.com> on 2009/10/02 19:35:36 UTC
Reading Content-Disposition header in flow.
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@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org