ropensci / crul

R6 based http client for R (for developers)
https://docs.ropensci.org/crul
Other
107 stars 17 forks source link

Try to handle headers with Latin1 encoding #164

Closed FlukeAndFeather closed 2 years ago

FlukeAndFeather commented 3 years ago

Description

Previous functionality: assume headers are UTF-8 encoded. New functionality: check if UTF-8 encoding is valid. If not, try Latin-1. If still not, throw an error specifying the issue.

Related Issue

Fixes #163

Example

Doesn't add features or change behavior; only a bug fix.

Re: tests, I don't know how to make a request that returns Latin-1 encoding in the header besides using rcrossref functions (see #163), which doesn't seem like it translates directly to a test. Sorry!

FlukeAndFeather commented 3 years ago

I just noticed I forgot to remove the .Rproj file from the commit. I assume you don't want that in there? If so I'll remove it.

sckott commented 2 years ago

thanks @FlukeAndFeather - yes, please remove the .Rproj file

FlukeAndFeather commented 2 years ago

.Rproj removed and crul.Rproj added to .gitignore to prevent something similar in the future.

FlukeAndFeather commented 2 years ago

The ubuntu failed check doesn't seem related to this pull request. Based on the message below, I think the version tag was deprecated or something.

Can't find any online and idle self-hosted runner in the current repository, account/organization that matches the required labels: 'ubuntu-16.04' Waiting for a self-hosted runner to pickup this job...

sckott commented 2 years ago

Thanks! Yeah no worries about the checks - i'll fix it later

sckott commented 2 years ago

heads up, i still need to have a detailed look at this, hopefully soon

sckott commented 2 years ago

Thanks, looks good.