Cannot GET service with name containing dot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Poppy |
Fix Released
|
High
|
Amit Gandhi |
Bug Description
I created a service with name as "mywebsite.com" (using the example at http://
The entry in the database looks like this:
cqlsh:poppy> select service_name, origins, flavor_id from services ;
service_name | origins | flavor_id
---
mywebsite.com | ['{"origin": "foobar.com", "port": 80, "rules": [], "ssl": false}'] | asia
(1 rows)
Now when I try to retrieve this service via a GET request, I get a 404:
$ curl -v 'http://
* About to connect() to 192.168.59.103 port 81 (#0)
* Trying 192.168.59.103...
* Adding handle: conn: 0x7fae44003a00
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleT
* - Conn 0 (0x7fae44003a00) send_pipe: 1, recv_pipe: 0
* Connected to 192.168.59.103 (192.168.59.103) port 81 (#0)
> GET /v1.0/services/
> User-Agent: curl/7.30.0
> Host: 192.168.59.103:81
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Content-Type: application/json; charset=UTF-8
< Content-Length: 47
<
* Connection #0 to host 192.168.59.103 left intact
{"message": "The resource could not be found."}
I even tried URL-encoding the dot in the name of the service, but I get the same error:
$ curl -v 'http://
* About to connect() to 192.168.59.103 port 81 (#0)
* Trying 192.168.59.103...
* Adding handle: conn: 0x7ff241803a00
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleT
* - Conn 0 (0x7ff241803a00) send_pipe: 1, recv_pipe: 0
* Connected to 192.168.59.103 (192.168.59.103) port 81 (#0)
> GET /v1.0/services/
> User-Agent: curl/7.30.0
> Host: 192.168.59.103:81
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Content-Type: application/json; charset=UTF-8
< Content-Length: 47
<
* Connection #0 to host 192.168.59.103 left intact
{"message": "The resource could not be found."}
Changed in poppy: | |
assignee: | Amit Gandhi (amit-gandhi) → Shaunak Kashyap (ycombinator-o) |
milestone: | kilo-1 → kilo-2 |
Changed in poppy: | |
status: | Fix Committed → Fix Released |
you are missing the project id.
either add the header X-Project-ID with your project-id, or put it in the url, e.g. 'http:// 192.168. 59.103: 81/v1.0/ 5823616/ services/ mywebsite. com'