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

Make accepted HTTP response status codes configurable #364

Merged
merged 2 commits into from
Feb 28, 2024
Merged

Make accepted HTTP response status codes configurable #364

merged 2 commits into from
Feb 28, 2024

Conversation

pmwmedia
Copy link
Contributor

@pmwmedia pmwmedia commented Feb 22, 2024

This pull request adds a new optional argument --status-codes to make the accepted HTTP response status codes configurable and solves #189 and #291.

I use muffet to check all links on https://tinylog.org/. However, some websites (e.g. https://stackoverflow.com, https://www.baeldung.com, and https://mkyong.com/) respond with status code 403 instead of 200 to muffet. Therefore, I would like to accept 403 as valid HTTP response status code.

@pmwmedia
Copy link
Contributor Author

Hi @raviqqe,

Can you consider approving the automatic workflow runs? This will allow me to fix any issues that may arise from the workflow runs until you have a chance to review the pull request. If there is anything I can approve, just let me know.

.snapshots/TestHelp Outdated Show resolved Hide resolved
status_code_range.go Outdated Show resolved Hide resolved
@raviqqe
Copy link
Owner

raviqqe commented Feb 26, 2024

Thank you for the changes!

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.58%. Comparing base (61d5451) to head (4a9453e).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #364      +/-   ##
==========================================
+ Coverage   87.50%   88.58%   +1.08%     
==========================================
  Files          30       32       +2     
  Lines         872      727     -145     
==========================================
- Hits          763      644     -119     
+ Misses         88       62      -26     
  Partials       21       21              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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