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

Binary files (e.g. png images) are clobbered on response #171

Closed
litlfred opened this issue Sep 4, 2014 · 2 comments · Fixed by #193
Closed

Binary files (e.g. png images) are clobbered on response #171

litlfred opened this issue Sep 4, 2014 · 2 comments · Fixed by #193

Comments

@litlfred
Copy link
Contributor

@litlfred litlfred commented Sep 4, 2014

Example:

http://CSD:password:liberia-staging.mhero.org:5001/static/USAID_CP_IH_PEPFAR_logos.png

Should return the image here:

https://github.com/openhie/openinfoman/blob/master/webapp/static/USAID_CP_IH_PEPFAR_logos.png

which has file length 93730,but instead returns a file of length 174504.

Looking at the hex representation, it seems that (starting a offeset 0) we have:

89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 00 00 03 92

becomes:

EF BF BD 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 00 00 03 EF BF BD

maybe is is a UTF-8 encoding issue?

@rcrichton rcrichton added this to the v0.3.x milestone Sep 8, 2014
@rcrichton rcrichton added this to the v0.3.x milestone Sep 8, 2014
@litlfred
Copy link
Contributor Author

@litlfred litlfred commented Sep 8, 2014

Note, I am not sure if this also affects incoming binary data to OpenHIM. As you fix this bug, would you mind adding a test case to check incoming as well. Thanks!

@rcrichton
Copy link
Member

@rcrichton rcrichton commented Sep 9, 2014

Thanks Carl, good point. We will check this out. Btw, if you guys would like to work on these, feel free to submit PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants