python-holdup icon indicating copy to clipboard operation
python-holdup copied to clipboard

Add support for Acceptable HTTP status codes

Open mithun opened this issue 7 years ago • 2 comments

I have a use case where the HTTP check returns a 401 since I'm not providing credentials.

I'd like to submit a PR to allow acceptable HTTP Status codes other than 200. Please let me know if you have preferences on how this should be implemented.

mithun avatar Apr 30 '18 17:04 mithun

How about this sort of syntax: holdup http://abc 401=http://foo 3*=http://bar?

Maybe not = but +? Like holdup http://abc http+401://foo http+3*://bar

Also, http+3*+insecure://bar or http+insecure+3*://bar vs 3*=http+insecure://bar?

I think the + would be cleanest to implement but haven't really looked - what do you think?

ionelmc avatar Nov 23 '18 12:11 ionelmc

So I've been thinking about this again, and I guess glob syntax with plus sign should be fine.

These should be acceptable (all would go into fnmatch):

http+404://blabla
http+40[13]://blabla
http+40?://blabla
http+4*://blabla
http+4://blabla (identical)
http+[45]://blabla
http+4*+5*://blabla (identical)
http+4+5://blabla (identical)

ionelmc avatar Apr 15 '24 07:04 ionelmc