diff --git a/pycsw/core/config.py b/pycsw/core/config.py index 35734b3f9..9c57a7b56 100644 --- a/pycsw/core/config.py +++ b/pycsw/core/config.py @@ -363,7 +363,7 @@ def __init__(self, prefix='csw30'): }, 'parameters': { 'typeNames': { - 'values': ['csw:Record'] + 'values': ['csw:Record', 'csw30:Record'] }, 'outputSchema': { 'values': ['http://www.opengis.net/cat/csw/3.0'] diff --git a/pycsw/ogc/csw/csw3.py b/pycsw/ogc/csw/csw3.py index 4c73ce99f..24ceea344 100644 --- a/pycsw/ogc/csw/csw3.py +++ b/pycsw/ogc/csw/csw3.py @@ -613,7 +613,7 @@ def getrecords(self): 'elementsetname', 'Missing one of ElementSetName or ElementName parameter(s)') - if 'elementsetname' in self.parent.kvp and 'elementname' in self.parent.kvp: + if 'elementsetname' in self.parent.kvp and 'elementname' in self.parent.kvp and self.parent.kvp['elementname']: # mutually exclusive required return self.exceptionreport('NoApplicableCode', 'elementsetname', @@ -645,7 +645,7 @@ def getrecords(self): if ofmt.split('/')[0] in self.parent.kvp['outputformat']: LOGGER.debug('FOUND OUTPUT MATCH') formats_match = True - if not formats_match: + if not formats_match and self.parent.environ['HTTP_ACCEPT'] != '*/*': return self.exceptionreport('InvalidParameterValue', 'outputformat', 'HTTP Accept header (%s) and outputformat (%s) must agree' % (self.parent.environ['HTTP_ACCEPT'], self.parent.kvp['outputformat'])) @@ -930,8 +930,8 @@ def getrecords(self): try: if (self.parent.kvp['outputschema'] == 'http://www.opengis.net/cat/csw/3.0' and - 'csw:Record' in self.parent.kvp['typenames']): - # serialize csw:Record inline + 'csw30:Record' in self.parent.kvp['typenames']): + # serialize csw30:Record inline searchresults.append(self._write_record( res, self.parent.repository.queryables['_all'])) elif (self.parent.kvp['outputschema'] ==