Closed xaxis-ii closed 2 years ago
Yes, original I was handling CORS manually and then removed the manual steps once the internal cors handling was available. So I can believe I missed taking this out for the /value request.
I wasn't able to reproduce the error by adding the Origin header. See: https://github.com/HDFGroup/hsds/blob/lambda2/tests/integ/value_test.py#L1443. Am I missing something?
The issue only occurs when downloading with the Accept: Octet-Stream
type set to request binary return value. The test you've linked doesn't set this header and downloads json, which bypasses the problematics lines within the binary response branch of the if statement.
Ok - that's helpful - I can actually see the fail now. Checked in the fix to the lambda2 branch. Will merge with master soon.
This is checked in in master now. Please re-open if this is still an issue.
The following lines in
chunk_sn.py
are superfluous and conflict with aiohttp's internal (now enabled) CORS handling code if theOrigin
header is set on an incoming request. They should be removed as CORS is handled automatically without them.Resulting exception ('Error handling request') looks like this in docker logs: