Ok, this issue has arisen again, but in a somewhat different form. It appears that $http is having problems with URLs that have ports in them. Specifically:
//no port in url
$http({ method: "GET", url: "/v1/rest/services" });
//headers passed
GET /v1/rest/services HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
Accept: application/json, text/plain, */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Connection: keep-alive
X-Requested-With: XMLHttpRequest
//port in url
$http({ method: "GET", url: "/v1/rest/services:8081" });
//headers passed
OPTIONS /v1/rest/services HTTP/1.1
Host: localhost:8081
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Connection: keep-alive
Access-Control-Request-Method: GET
Access-Control-Request-Headers: auth-session,x-requested-with
This is a problem. The method is not being used and the Accept header is not being passed. I need a work-around. Anybody have any ideas?