I think the problem is that there is a space in the URI before "filename=", and that is not encoded before it being sent out, causing the server to think "filename=..." is the http version...
I think the problem is that there is a space in the URI before "filename=", and that is not encoded before it being sent out, causing the server to think "filename=..." is the http version...