Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix HttpResponse parse() method for binary files that dont convert raw->char #115

Closed
sckott opened this issue Jul 25, 2019 · 1 comment · Fixed by #116
Closed

fix HttpResponse parse() method for binary files that dont convert raw->char #115

sckott opened this issue Jul 25, 2019 · 1 comment · Fixed by #116
Milestone

Comments

@sckott
Copy link
Collaborator

sckott commented Jul 25, 2019

No description provided.

@sckott sckott added this to the v0.9 milestone Jul 25, 2019
@sckott
Copy link
Collaborator Author

sckott commented Jul 25, 2019

e.g.,

library(crul)
url <- "https://dods.ndbc.noaa.gov/thredds/fileServer/data/cwind/41001/41001c1997.nc"
f <- file.path(tempdir(), "41001c1990.nc")
out <- HttpClient$new(url)$get(disk = f)
out$parse()
#> Error in rawToChar(raw) :
#>   embedded nul in string: 'CDF\00

sckott added a commit that referenced this issue Jul 25, 2019
fix parse for when binary file can not be converted to char with rawToChar
use tryCatch to try to parse, and on error, just give back raw
bump dev version
sckott added a commit that referenced this issue Jul 30, 2019
fix parse for when binary file can not be converted to char with rawToChar
use tryCatch to try to parse, and on error, just give back raw
bump dev version
@sckott sckott modified the milestones: v0.9, v0.8.4 Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant