POST request trying to make a Session authentication in the REST SERVER return a HTML error 406 Not acceptable
First of all make sure you choose the appropriate Data types for request formatters and parsers for your resource. You will find it under admin/structure/services/list/your_resource_name/server. Having said that, this works for me :

// .xml asks for xml data in response, choose what you need here
$service_url = 'http://localhost/your-endpoint/user/login.xml'; 
$post_data = array(
    'username' =&gt; 'admin',
    'password' =&gt; 'pass',
);
// We format post data as application/x-www-form-urlencoded so make 
// sure that you tick it under the rest server parser options.
$post_data = http_build_query($post_data, '', '&amp;'); 
// Initialize the request
$curl = curl_init($service_url);
// We want curl to return a string
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);  
// Choose method POST
curl_setopt($curl, CURLOPT_POST, true);
// Feed the data to POST to curl
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data); 
// Make it verbose for debugging.
curl_setopt($curl, CURLOPT_VERBOSE, true);
// Go!
$response = curl_exec($curl);
curl_close($curl);
print "LOGIN RESPONSE:\n";
var_dump($response);
// parse the response we get (in XML see above)...