tcalmant / jsonrpclib

A Python (2 & 3) JSON-RPC over HTTP that mirrors the syntax of xmlrpclib (aka jsonrpclib-pelix)
https://jsonrpclib-pelix.readthedocs.io/
Apache License 2.0
53 stars 24 forks source link

Improve HTTP/1.1 compliance for unix sockets #47

Closed markmcclain closed 3 years ago

markmcclain commented 3 years ago

Send 'Host: localhost' header for better interoperability

RFC7230 [1] requires that a hostname MUST be sent for HTTP/1.1 requests. Currently, the path is sent which breaks some jsonrpc servers that do not permit the invalid '/' character in a host name. 'localhost' was chosen since the client intends to communicate with the localhost via unix domain socket.

[1] https://tools.ietf.org/html/rfc7230#section-5.4

coveralls commented 3 years ago

Coverage Status

Coverage remained the same at 83.939% when pulling a0b73a3a5ee0756867532ac56cdf929a86dc4ac2 on markmcclain:localhost into c4313d61844874c6cd969c5a7c92fec39e2365be on tcalmant:master.

coveralls commented 3 years ago

Coverage Status

Coverage remained the same at 83.939% when pulling a0b73a3a5ee0756867532ac56cdf929a86dc4ac2 on markmcclain:localhost into c4313d61844874c6cd969c5a7c92fec39e2365be on tcalmant:master.

coveralls commented 3 years ago

Coverage Status

Coverage remained the same at 83.939% when pulling a0b73a3a5ee0756867532ac56cdf929a86dc4ac2 on markmcclain:localhost into c4313d61844874c6cd969c5a7c92fec39e2365be on tcalmant:master.

tcalmant commented 3 years ago

Thanks 👍