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

ignoreHttp1xx or ignoreHttp1Xx #125

Closed
thiago opened this issue Jul 8, 2016 · 0 comments
Closed

ignoreHttp1xx or ignoreHttp1Xx #125

thiago opened this issue Jul 8, 2016 · 0 comments

Comments

@thiago
Copy link

thiago commented Jul 8, 2016

Hi, first I would like to thank you for this lib, It is been useful for us here.

Said that, I would like to discuss about a possible bug I've found. But before sending my pull request I want to discuss the best solution to fix it.

I notice that the attribute "ignoreHttp1xx" of the "healthCheck" is been converted to "ignoreHttp1Xx" with the first "X" in capital letter. Based on the Marathon scheme referenced in this link https://mesosphere.github.io/marathon/docs/generated/api.html#v2_apps_post it is a boolean and the atribute "ignoreHttp1xx" with "x" in lower case.

However marathon accepts the atribute with capital "X". I'm using marathon version 0.13.0

After analysing the results, I look into the library code and realized that the problem is in the native python string method "w.tittle()" line https://github.com/thefactory/marathon-python/blob/master/marathon/util.py#L59

I've developed one possible solution rewriting the method title and it is like this :

thiago@ddcc947

As marathon also accepts the wrong attribute, this is generating a bug in fact. I'm creating an application that stores and validate the marathon atributes according with their scheme and it's generating a bug in my application because I'm having to create a validation too specific only for this atribute.

A simple way to see this behaviour is with this python code.

. 'httpxx'.title() and then 'http1xx'.title()

Thanks

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