spatie / robots-txt

Determine if a page may be crawled from robots.txt, robots meta tags and robot headers
https://spatie.be/en/opensource/php
MIT License
219 stars 36 forks source link

Fixes "case-insensitive"-Rule in robots.txt #9

Closed Enaah closed 5 years ago

Enaah commented 5 years ago

Base on the Issue #8 (Robots.txt fields should be case-insensitive) I applied the necessary changes by simple writing all -elements case-insensitive. Another option could be using the strtolower()-Function on the -elements but this seems unclean.

The Issue was opend, based on the RFC-standard by google. The important part ist: "The element is case-insensitive. The element may be case-sensitive, depending on the element." (Source: https://developers.google.com/search/reference/robots_txt?hl=en)


I ran PHP-Unit (with the express-server running and all Test passed. But an Error was thrown, saying No code coverage driver is available. It has to do, that I do no have debug installed, hope this is no Problem.

If anything else is needed to accept the PR, please let me know.

Thanks @freekmurze for sharing the as a good start on open source on Twitter!

Enaah commented 5 years ago

The changes are pushed. Hope everything is okay.

freekmurze commented 5 years ago

Thanks!