biodiversitydata-se / SBDI4R

R package to search and access data made available through the Swedish biodiversity data infrastructure SBDI
https://biodiversitydata-se.github.io/SBDI4R/
GNU Affero General Public License v3.0
1 stars 2 forks source link

fields = "all" in occurrence() #37

Open aleruete opened 3 years ago

aleruete commented 3 years ago

Describe the bug The arguments fields and extra are not working as expected

To Reproduce calling

occurrences(taxon="sommarlånke",
                 fq = "data_resource_uid:dr5",
                 fields = "all", #or extra = "all",
                 email="test@test.org",
                 download_reason_id=10)

returns HTTP status code 414 received. Either there was an error with your request or servers are down "URL length may be longer than is allowed by the server"

Expected behavior a table with all available columns

shahmanash commented 3 years ago

While using the option fields = "all", the warning seem to originate from the following:

https://github.com/AtlasOfLivingAustralia/ALA4R/blob/master/R/cached_get.R#L44 https://github.com/AtlasOfLivingAustralia/ALA4R/blob/master/R/download_to_file.R#L24

Both of then are wrapped by SBDI4R and seem to be configurable:

https://github.com/biodiversitydata-se/SBDI4R/blob/master/R/onload.R#L22

Can you try with a higher value for server_max_url_length ?

The corresponding NGINX server setting large_client_header_buffers has been set to a higher value than default to mitigate the HTTP 414 URI Too Long error.