Closed Mulugruntz closed 2 years ago
Interesting... there's another bug about caching I believe. Now, the invalid link sometimes works and sometimes is broken. If I go directly to the link and refresh, it fixes it... for a while.
Great idea, I'm not sure why it returns 200. I'm away from my usual setup for a bit but I will try my best to get this resolved today or tomorrow. I'll look further into the caching part, that sounds strange,
This should be resolved (and reflected in production), I was unable to replicate the caching issue, is it still present for you?
BYOB will now return 404 if no config file is found, or if the badge name is not found. 400 is returned for any other invalid request, and of course 200 for a valid badge. Let me know if you think anything else should be modified, and thank you for the issue!
404 is good now.
The caching is still an issue. Not sure what I'm doing that is different.
Especially for when the image is non-existant, as you return the default 404 image, maybe it has been cached long ago and expired? Something like that...?
I'll open a different ticket...
This is my
shields.json
: https://github.com/Mulugruntz/celery-pubsub/blob/shields/shields.jsonIf I go to this invalid URL: https://byob.yarr.is/mulugruntz/celery-pubsub/m_linux_3.8_celery345:![invalid](https://byob.yarr.is/mulugruntz/celery-pubsub/m_linux_3.8_celery345)
And now, to this valid URL: https://byob.yarr.is/mulugruntz/celery-pubsub/m_linux_3.8_celery3:![valid](https://byob.yarr.is/mulugruntz/celery-pubsub/m_linux_3.8_celery3)
Both return an HTTP status 200. If would be great to actually return 404 to avoid parsing the SVG. In my use case, I made a sparse matrix, so some of them should have badges and some should not.