Keep track of baseUrl root path and handle path-absolute resources.
This is related to issue #620.
API endpoint returns a path-absolute self link, such as /api/v1/person/5.
baseUrl setting includes part of this path, such as http://some.host:8000/api/v1/. baseUrlRoot will be set to http://some.host:8000.
If setSelfLinkAbsoluteUrl is not true, then a second check will happen to see if the self link begins with a slash. If so it is treated as path-relative and appended to baseUrlRoot.
This covers my own issues with self links cross domain as well as the path-absolute issues touched upon in #620.
@aivins, would that work when the self link is relative to the API root? e.g. /person/5 instead of /api/v1/person/5 where baseUrl is /api. I've found that python-eve is moving into that direction (nicolaiarocci/eve@69b8141c0c5f10e8d4221e56228a80cb0bc92bd6), which makes sense to me. See also #665.
I think this should be good; I need to read it again and test it more thoroughly. A couple items tho:
- [ ] Can you rebase on master please?
- [ ] And…can you please add some tests?
Any chance of this getting merged anytime soon? I'm seeing quite a few open issues relating to this.