问题
I found this article: http://supportforums.blackberry.com/t5/Java-Development/Issues-with-BlackBerry-MDS-Connection-Service-when-using-Pre/ta-p/495706
It says that starting from BlackBerry Enterprise Server 4.1.7 you can add x-rim-authentication-passthrough header to bypass MDS HTTP authentication per request.
Can someone please tell me which value to set for this header? My wild guesses so-far that haven't worked are:
//httpConn.setRequestProperty("x-rim-authentication-passthrough", "true");
//httpConn.setRequestProperty("x-rim-authentication-passthrough", "enabled");
//httpConn.setRequestProperty("x-rim-authentication-passthrough", "");
//httpConn.setRequestProperty("x-rim-authentication", "passthrough");
//httpConn.setRequestProperty("x-rim-authentication-passthrough", "arghhh");
//httpConn.setRequestProperty("x-rim-authentication-passthrough", "where the hell is the documentation?");
//httpConn.setRequestProperty("x-rim-authentication-passthrough", "put the lime in the coconut");
Thanks,
Ray
回答1:
The correct answer is:
httpConn.setRequestProperty("x-rim-authentication-passthrough", "true");
I must have messed something up the first time around. I never did find the documentation, I got the answer from someone at RIM.
来源:https://stackoverflow.com/questions/6317956/what-is-the-correct-header-value-to-bypass-mds-http-authentication