Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getData fails to check for I/O errors #100

Open
RKrahl opened this issue Apr 23, 2019 · 2 comments
Open

getData fails to check for I/O errors #100

RKrahl opened this issue Apr 23, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@RKrahl
Copy link
Member

RKrahl commented Apr 23, 2019

When the client requests the download of a dataset having more then one datafile using the getData call, ids.server will send a zip file in the body of the reply. Now if an I/O errors occurs while streaming this zip file, e.g. if the plugin fails to read one of the datafiles, the HTTP status of the response will still be ok (200), e.g. it will not indicate any error. However the zip file in the body will be corrupt.

@RKrahl RKrahl added the bug Something isn't working label Apr 23, 2019
@RKrahl
Copy link
Member Author

RKrahl commented Apr 23, 2019

This is a tricky one, because ids.server streams the zip in the response right away. E.g. it replies with a ZipOutputStream and thus creates the zip directly writing it in the HTTP reply stream. This is the right way to do it, because it results in the best performance. However, when an error occurs while assembling the reply, the HTTP status and the start of the zip file is already been written and cannot be changed anymore.

@RKrahl
Copy link
Member Author

RKrahl commented Apr 23, 2019

This is related to #79.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant