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

Handle invalid X-Robots-Tag header values #1

Conversation

Mickael-van-der-Beek
Copy link

In cases where the X-Robots-Tag header value is invalid, the regular expression will return null which will break the line after when it is assumed that result is an array and an element is accessed by index.

This fix will make the code fallback to the default value of result.

Example of a failing case (found in the wild): 'noindex, nofollow\nnosnippet, noarchive'

@coveralls
Copy link

coveralls commented Feb 18, 2019

Coverage Status

Coverage decreased (-0.3%) to 99.711% when pulling 3a2257c on Mickael-van-der-Beek:fix-split-regexp into 966febc on stevenvachon:master.

@Mickael-van-der-Beek
Copy link
Author

@stevenvachon Could this PR be merged?

@stevenvachon
Copy link
Owner

@Mickael-van-der-Beek please rebase

@Mickael-van-der-Beek
Copy link
Author

@stevenvachon Done. Sorry for the delay.

@stevenvachon
Copy link
Owner

@Mickael-van-der-Beek the coverage dropped

Base automatically changed from master to main February 27, 2021 22:26
@stevenvachon
Copy link
Owner

This has been implemented on master branch.

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.

None yet

3 participants