natverse / rcatmaid

R package providing API access to the CATMAID web image annotation tool
https://natverse.github.io/rcatmaid
GNU General Public License v3.0
9 stars 6 forks source link

HTTP/2 calls fail in `catmaid` server #158

Closed SridharJagannathan closed 4 years ago

SridharJagannathan commented 4 years ago

Some large volume calls to the server fail when using http/2. See below

selected_15 = c(1764824, 1102390, 2639558, 3376158, 2096700, 1710886, 1093554, 1706774, 11543519, 1101751, 2633111, 14566263, 11545803, 2659704, 2684792)
catmaid_get_connector_table(selected_15, direction = "incoming")

throws the error

Error in curl::curl_fetch_memory(url, handle = handle) : HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)

However, the following works fine

catmaid_get_connector_table(selected_15[1], direction = "incoming")

On deeper investigation it was found the rootcause is due to a protocol error encountered by curl, see here: https://github.com/curl/curl/issues/3206

This could be resolved by downgrading to http/1 like below:

conn = catmaid_login(config=httr::config(ssl_verifypeer=0, http_version=1))
catmaid_get_connector_table(selected_15, direction = "incoming", conn = conn)
SridharJagannathan commented 4 years ago

The issue needs to be closed by the following actions: Document the usage of changing http options in catmaid_login docs

jefferis commented 4 years ago

Closed by #159

jefferis commented 4 years ago

Thanks again @SridharJagannathan!