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

Fixed proxying pages with encoding other than utf-8 #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

asagajda
Copy link

Jacob, thank you for sharing great tool!
Take a look at my PR, that fixes broken encoding when trying to proxy pages with encoding other than utf-8.
You can reproduce problem by querying http://localhost:3000/https://newtimes.ru/rubrics/ as example.

@imjacobclark
Copy link
Owner

@asagajda Thanks for the PR, could you fix the failing tests and potentially add some for the new functionality?

I'll look to merge this then! Thanks.

@solo5star
Copy link

I am using this project to get instagram images (cdninstagram.com) through proxy. Instagram gave me a jpeg response but since the default encoding is utf8, irrelevant values (UTF-8 magic bytes) ​​are attached to the jpeg byte array. Therefore, the byte array must be preserved by setting the encoding to null. (encoding: null)
image

@imjacobclark
Copy link
Owner

This looks great, are you able to add any tests so I can get this merged?

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 this pull request may close these issues.

3 participants