-
Task
-
Resolution: Fixed
-
Normal
-
None
-
None
-
None
-
Brown Dog - 2017 May 2, Brown Dog - 2017 June Sprint 1
POST [https://bd-api.ncsa.illinois.edu/dap/convert/png] works fine
POST [http://bd-api.ncsa.illinois.edu/dap/convert/png] returns list of available conversions for png.
kooper helped with debugging this. There is some issue in the way we are sending post requests in bd.py. Requests is not being to handle HTTP error code 307 (redirect) in the special way we are generating multipart requests using a custom method multipart. Two things to do:
- As a quick fix, we can send allow_redirects=False and then handle 307 status code (or for that matter any status in the range 300-399) at client side and resend the request to first_response.headers['location']
- We need to look deeper to understand how to upload large files and at the sametime have requests handle redirects on it's own.