ecotaxa / ecotaxa_back

Backend of the EcoTaxa application
GNU General Public License v3.0
6 stars 5 forks source link

Taxonomy sync inside Windows Docker sends chunked http post to EcoTaxoServer #63

Closed grololo06 closed 1 year ago

grololo06 commented 1 year ago

Seen on a "all-in-one" instance, docker environment on a Windows box.

Traces here

Installation guide which was used here

grololo06 commented 1 year ago

I tried a from-scratch install of the all-in-one docker compose, but on Linux and the problem cannot be seen. From the code, while composing the request, package with same name cannot determine the length of the POST, so it sets this "Chunked" header. Requests code here

grololo06 commented 1 year ago

Reproduced on a Windows laptop with docker!

grololo06 commented 1 year ago

Hum, I saw no 30x response from EcoTaxoServer, and a direct curl in Windows CMD works fine:

C:\Users\grolo>curl http://ecotaxoserver.obs-vlfr.fr/gettaxon/ -d "id_instance=9&sharedsecret=ZiAgKGDHiQ4WAj6Gi1RN41WHrMkPut8B3AzgXqLWZ&ecotaxa_version=2.5.11&filtertype=since&startdate=2024-01-01+00:00:00"
[]
grololo06 commented 1 year ago

But a docker image triggers the bug on Windows:

C:\Users\grolo>docker run curlimages/curl:latest http://ecotaxoserver.obs-vlfr.fr/gettaxon/ -d "id_instance=9&sharedsecret=ZiAgKGDHiQ4WAj6Gi1RN41WHrMkPut8B3AzgXqLWZ&ecotaxa_version=2.5.11&filtertype=since&startdate=2024-01-01+00:00:00"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   168  100    30  100   138    210    967 --:--:-- --:--:-- --:--:--  1183
{"msg":"filtertype required"}

and not on Linux:

all_in_one$ docker run curlimages/curl:latest http://ecotaxoserver.obs-vlfr.fr/gettaxon/ -d "id_instance=9&sharedsecret=ZiAgKGDHiQ4WAj6Gi1RN41WHrMkPut8B3AzgXqLWZ&ecotaxa_version=2.5.11&filtertype=since&startdate=2024-01-01+00:00:00"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   141  100     3  100   138     18    858 --:--:-- --:--:--[]-:--:--     0
 --:--:--   881

=> It's related to combination Docker+Windows and nothing to do with python code.

grololo06 commented 1 year ago

Most probably similar to https://github.com/docker/for-win/issues/13258 and works fine with https:

grololo06 commented 1 year ago

Not much more we can do for the moment.