Opened 20 years ago
Closed 15 years ago
#649 closed defect (fixed)
DescribeCoverage Not Throwing Exception on Illegal Coverage
Reported by: | warmerdam | Owned by: | sdlime |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | WCS Server | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description (last modified by )
Currently no exception is thrown if a coverage is requested that does not exist, but I *think* there should be an exception. I would add that the exception should be thrown in the case of a coverage name that is a layername which isn't enabled for WCS support as well as the case of a coverage name with no analog in the mapfile.
Change History (8)
comment:2 by , 20 years ago
Selecting a FORMAT that is not in the wcs_formats list results in the mime header being returned, but no data being returned. No exception is generated. In this case the OUTPUTFORMAT declaration does exist. An exception should be produced.
follow-up: 4 comment:3 by , 17 years ago
Committed:
- msWCSDescribeCoverage: throw Exception if Coverage doesn't exist
- msWCSException: updated as per WCS 1.0 Appendix A.6
Currently, an Exception is thrown if a format is requested which is not supported. I couldn't reproduce Frank's format issue as per above.
Steve: can you verify? I haven't closed this one due to this issue.
comment:4 by , 17 years ago
Description: | modified (diff) |
---|
Replying to tomkralidis:
Tom, sorry it's not clear what you want me to verify?
comment:5 by , 17 years ago
Steve: the format comment:
"Selecting a FORMAT that is not in the wcs_formats list results in the mime header being returned, but no data being returned. No exception is generated. In this case the OUTPUTFORMAT declaration does exist. An exception should be produced."
Currently, an Exception is thrown if a format is requested which is not supported. I couldn't reproduce Frank's format issue as per above.
comment:7 by , 17 years ago
Tom,
The following code verifies that the format name is recognised by MapServer (relates to a built-in or user defined outputformat) but it does not restrict things to the list of formats specified in the layer metadata (and returned as the supported format list). I personally don't think it is that critical to force that restriction but this is the right area to do it if required.
/* check and make sure there is a format, and that it's valid (TODO: make sure in the layer metadata) */ if(!params->format) { msSetError( MS_WCSERR, "Missing required FORMAT parameter.", "msWCSGetCoverage()" ); return msWCSException(map, params->version, "MissingParameterValue", "format"); } if(msGetOutputFormatIndex(map,params->format) == -1) { msSetError( MS_WCSERR, "Unrecognized value for the FORMAT parameter.", "msWCSGetCoverage()" ); return msWCSException(map, params->version, "InvalidParameterValue", "format"); }
comment:8 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Closing. OUTPUTFORMATs are being pushed to GetCapabilities, and GetCoverage is throwing an exception if an invalid format is passed.