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

content_type requires a further check to identify the charset #66

Closed
ravichandrasadineni opened this issue Jul 22, 2015 · 7 comments
Closed

Comments

@ravichandrasadineni
Copy link

Current logic for identifying the charset does not worry about additional parameters that might be present in the content-type query parameter. For example apache server adds an additional parameters such as qs in the content-type. So a better logic to identify the charset will help.

ravichandrasadineni added a commit to ravichandrasadineni/gabbi that referenced this issue Jul 22, 2015
@cdent
Copy link
Owner

cdent commented Jul 22, 2015

Thanks, good catch. The BNF for how parameters are handles says that multiple parameters should look like this:

Content-Type: media/submedia ; foo=something ; bar=else

So it ought to be possible to extract a dict from the parameters and look for one that is charset.

I'll look into this.

@cdent
Copy link
Owner

cdent commented Jul 22, 2015

Ah cool, you did it! Thanks, will look.

@cdent cdent closed this as completed in 59ad054 Jul 22, 2015
@cdent
Copy link
Owner

cdent commented Jul 22, 2015

I went ahead and did my own version, mostly for stylistic reasons. Thanks very much for reporting the bug. What are you using gabbi to test?

ravichandrasadineni added a commit to ravichandrasadineni/gabbi that referenced this issue Jul 22, 2015
@ravichandrasadineni
Copy link
Author

cool. Thank you. We are trying to build a framework to auto-generate rest-api compliance test cases from swagger specification. So we wrote a tool to convert Swagger spec to gabbi yaml files and using gabbi to validate the response JSON with the Schema in the Swagger Specifications. Thanks for the tool.

@cdent
Copy link
Owner

cdent commented Jul 22, 2015

The version with this fix should be out by the end of the week.

If your tool that does swagger to gabbi is usable by the public I'd love to be able to link to it from the docs. Is it?

@ravichandrasadineni
Copy link
Author

Thanks. We would love to publish it. But we are in the very early stage yet. I would certainly let you know once we are good shape to publish it. Thanks.

@cdent
Copy link
Owner

cdent commented Jul 23, 2015

This is released in 1.1.3 which is coming out in a few minutes.

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