Re: Using SRV records with a http Web Service

if you think of a srv as a more fine grained cname, the answer is obvious -
don't change the host header as it needs to reflect the origin.

On Tue, Dec 15, 2015 at 12:29 PM, Phillip Hallam-Baker <
phill@hallambaker.com> wrote:

> I am trying to spec out a Web Service. It is obviously desirable to use
> SRV based discovery over A-record since that allows for priority, fallback,
> etc.
>
> However rfc7230 is silent on the matter.
>
> The point of complication that enters is what the name for the Host:
> header. Should this be remapped to the address given in the SRV or not? My
> view is that it should not.
>
> so if the service being resolved is _mmm._tcp.example.com and we have srv
> records:
>
> _mmm._tcp.example.com SRV 0 5 80 host1.example.com
> _mmm._tcp.example.com SRV 0 5 80 host2.example.com
>
> The Host: header should be:
>
> Get /.well-known/mmm/
> Host: example.com
>
>
> This seems like the obvious approach. However there are two other
> possibilities:
>
> Host: host1.example.com
> Host: _mmm._tcp.example.com
>
> The first is obviously unhelpful and wrong as the SRV alias identifies a
> machine, not the site.
>
> The second could actually be useful though. It essentially eliminates the
> need for .well-known URIs.
>
>

Received on Tuesday, 15 December 2015 19:31:32 UTC