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

duplicating Content-Type header #66

Open
dotysan opened this issue Mar 17, 2022 · 1 comment
Open

duplicating Content-Type header #66

dotysan opened this issue Mar 17, 2022 · 1 comment

Comments

@dotysan
Copy link

dotysan commented Mar 17, 2022

This wasn't a problem in Python 2 where xmlrpclib used connection.putheader("Content-Type", "text/xml"). But in Python 3, where xmlrpc.client uses headers.append(("Content-Type", "text/xml")), this https://github.com/joshmarshall/jsonrpclib/blob/master/jsonrpclib/jsonrpc.py#L107 connection.putheader("Content-Type", "application/json-rpc") actually creates a second Content-Type header instead of replacing the text/xml one.

This duplicate Content-Type headers generates 400s on lighttpd.

@dotysan
Copy link
Author

dotysan commented Mar 18, 2022

*Second Content-Type header; not duplicate.

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

1 participant