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

Custom HTTP status codes for DDS checker #95

Open
WarToaster opened this issue Jul 26, 2017 · 2 comments
Open

Custom HTTP status codes for DDS checker #95

WarToaster opened this issue Jul 26, 2017 · 2 comments

Comments

@WarToaster
Copy link

Hi Holger!

First of all, thank you for this fantastic piece of software!

I'd love for DDS checkers to support custom HTTP status codes. For example, the website that I'm scraping is returning 302 codes for items that no longer exist. That would also mean checking for xpath values on redirected urls.

Looking forward to hearing your thoughts on that.

@holgerd77
Copy link
Owner

Hi, would be open for that, though I'm not having that much time atm to do the changes on short term (also sorry for the late answer).

After reflecting on this a couple of minutes, I think, following might be a good implementation:

  • Replacing 404 type with CUSTOM_HTTP_CODE type
  • Replacing 404_OR_X_PATH type with CUSTOM_HTTP_CODE_OR_XPATH type
  • Adding a field checker_custom_http_code which defaults to 404

Like this backwards compatibility would also be kept (existing settings wouldn't break).

What do you think? Does this makes sense?

@WarToaster
Copy link
Author

Thanks for the answer. Don't worry about short term changes, I'd rather have them solid instead of rushed.

If you're worried about backwards compatibility, maybe adding a CUSTOM_HTTP_CODE instead of replacing the 404 type makes more sense. Otherwise I think your suggestions sound perfect.

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

No branches or pull requests

2 participants