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

Fix a problem where the header only contains 200 #92

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

Conversation

roerlemans
Copy link

I got this as a response, but still would be valid:

HTTP/1.1 200 

Can you take a look and merge this @shweshi

I got this as a response, but still would be valid:

```
HTTP/1.1 200 
```
@@ -111,7 +111,7 @@ protected function verify_image_url($url)
]);
$headers = get_headers($url, true, $context_headers);

return stripos($headers[0], '200 OK') ? true : false;
return stripos($headers[0], '200') ? true : false;
Copy link
Owner

Choose a reason for hiding this comment

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

@roerlemans can we keep checks for both '200 OK' and '200'

Copy link
Author

Choose a reason for hiding this comment

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

the OK-part is not always available in the response. When I check both, it would still fail in the use case I found.

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.

2 participants