Reputation: 1
I have set the header as c.setRequestProperty("Content-Language", "en-US"); in BB app and i am reading it on server as Request.ServerVariables("HTTP_ACCEPT_LANGUAGE"). But i am getting a null value. What may be wrong?
Upvotes: 0
Views: 629
Reputation: 1038710
The header you are trying to read is Accept-Language
:
c.setRequestProperty("Accept-Language", "en-US");
If you want to use the Content-Language
header, then you could read it with Request.ServerVariables("HTTP_CONTENT_LANGUAGE")
constant.
Upvotes: 2