View with reduce function don't work on port 4984

Hi, i have a reduce function in a view that just returns a _count for a given type of document. The code is below:

	"views": {
		"total": {
			"map": "function(doc){if(doc.type == \"auto\"){emit(doc.number, doc.number);}}",
			"reduce": "_count"

This works properly at couchbase admin interface (at port 8091) and sync gateway at port 4984 (without authentication), but don’t work at sync gateway on port 4985 (with authentication and https). I am using curl to get the response like that:

This works fine…
curl -X GET ‘http://my_url:4985/my_database/_design/total/_view/total?reduce=true’

But both don’t works…
curl -X GET ‘http://my_url:4984/my_database/_design/total/_view/total?reduce=true’

curl -kX GET --cookie “SyncGatewaySession=f64430c74ce2fd058edaff107d676498f137b4b1”