HDFGroup / hsds

Cloud-native, service based access to HDF data
https://www.hdfgroup.org/solutions/hdf-kita/
Apache License 2.0
126 stars 52 forks source link

swapped arguments for HTTPRequestEntityTooLarge #221

Closed assaron closed 1 year ago

assaron commented 1 year ago

I noticed that the arguments for HTTPRequestEntityTooLarge are swapped in the code. I didn't find any documentation entry, but from the code https://github.com/aio-libs/aiohttp/blob/edd49b5c445b1b325e483a70bdf2635d6b72f64f/aiohttp/web_exceptions.py#L365 the arguments for HTTPRequestEntityTooLarge is first max size and then actual size. However, in hsds code it's called in the inverse order, e.g. here: https://github.com/HDFGroup/hsds/blob/master/hsds/chunk_sn.py#L631

assaron commented 1 year ago

Sorry, I didn't properly specify, but there are two other lines with the same problem: https://github.com/HDFGroup/hsds/blob/master/hsds/chunk_sn.py#L1096 and https://github.com/HDFGroup/hsds/blob/master/hsds/chunk_sn.py#L1633 These are the only two as far as I can tell.

jreadey commented 1 year ago

Thanks @assaron . I've pushed a fix for the other two in the chunkreffix branch. I'll close this once I merge with master.

mattjala commented 1 year ago

chunkreffix was merged in #226 ; closing.