promoted the path/location resolution to the base object

the missing Location header is applicable to multiple resources, this
snippet will check if it's missing and generate one if it is
since the Location is missing in some cases, this checks for it