Skip to content

Alter headers#597

Closed
enfipy wants to merge 1 commit intoparitytech:masterfrom
enfipy:master
Closed

Alter headers#597
enfipy wants to merge 1 commit intoparitytech:masterfrom
enfipy:master

Conversation

@enfipy
Copy link
Copy Markdown

@enfipy enfipy commented Nov 13, 2020

This PR alters headers ACCEPT and content type for text/json.

The ideal solution is to provide a method to change it via lib API but as a workaround - this will help https://github.com/adoriasoft/polkadot_cosmos_integration.

@tomusdrw
Copy link
Copy Markdown
Contributor

Can't find text/json in supported MIME types: https://www.iana.org/assignments/media-types/media-types.xhtml#text

I'm reluctant to add that, since it may have security implications (application/json requires pre-flight request for CORS in browsers, I'm not sure if that's going to be the case for text/json as well).

I feel this is more of a problem of the client library you are using than the server, similarly how we don't accept malformed HTTP requests I'm not yet convinced we should accept malformed mime types.

@enfipy
Copy link
Copy Markdown
Author

enfipy commented Nov 13, 2020

You are right. So I think it's better to update tendermint instead: https://github.com/tendermint/tendermint/blob/346aa14db560c3c867a3e00b4fbd8b000dcffe30/rpc/jsonrpc/client/http_json_client.go#L219

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