Open jmaspons opened 4 months ago
This feels familiar and I thought I had dealt with this before. My guess would be that it's a difference of path separators. Probably inserting a gsub("\\", "/", x)
in there would standardize. (normalizePath()
could do this but it also expands the path, and absolute paths will definitely not match across systems.)
On #40 we saw this happening because of CRLF differences in text files. For multipart forms, if there is a curl::form_file()
, we hash the file contents, not the file path, so backslashes shouldn't be relevant.
Reading the source in https://github.com/jmaspons/osmapiR (and in xml2), it wasn't obvious to me where that would be coming from. And even so, it's not obvious what to do about CRLF here, if anything.
Seems that you spot the problem and the solutions at https://github.com/jmaspons/osmapiR/pull/28
We can close this issue documenting the trick in the readme or vignette
I found that the paths on Linux/Mac are different from the Windows one. Only for multipart requests. Could explain the failing test in #40 (but not related to the
form_data
VScharacter
content), see https://github.com/nealrichardson/httptest2/actions/runs/8881677497/job/24384594955?pr=40 or https://github.com/jmaspons/osmapiR/actions/runs/9210988574/job/25339688825No idea how to fix it, and difficult to reproduce because it depends on the OS.