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

Return proper content type instead of image/* #662

Merged
merged 1 commit into from Apr 12, 2020
Merged

Return proper content type instead of image/* #662

merged 1 commit into from Apr 12, 2020

Conversation

paskal
Copy link
Sponsor Collaborator

@paskal paskal commented Apr 11, 2020

Resolve #598.

Current master

➜ curl -o /dev/null -D - -s https://127.0.0.1:8080/api/v1/picture/github_f1f725d06af013456a9b98d923f9b2ce5c7ba91a/bq906dihajfi6fd90ci0 | grep '^Content-Type:'
Content-Type: image/*

After this PR

➜  remark42 git:(master) ✗ curl -o /dev/null -D - -s http://127.0.0.1:8080/api/v1/picture/dev_user/bq90856q9r8d70c29vpg | grep '^Content-Type:'
Content-Type: image/png

Also opening such an image in a browser now shows it instead of opening save prompt.

I've tested image save and load but didn't test proxy changes as it's not clear for me when it's involved. But I think it should work fine.

@paskal
Copy link
Sponsor Collaborator Author

paskal commented Apr 11, 2020

I can't figure out why this fails, working on it.

UPD: sometimes imageStore.Commit() is not called for some reason, I think I might fix it with imageStore.Close() call but for that I need fixes from #658 applied first.

Copy link
Owner

@umputun umputun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@umputun umputun merged commit fc63493 into master Apr 12, 2020
@umputun umputun deleted the img_types branch April 12, 2020 08:57
@umputun umputun added this to the v1.6 milestone Apr 12, 2020
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.

Lack of proper image types
2 participants