[
https://issues.apache.org/jira/browse/THRIFT-4621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16591625#comment-16591625
]
ASF GitHub Bot commented on THRIFT-4621:
----------------------------------------
nsuke commented on a change in pull request #1583: THRIFT-4621 Add THeader for
Python
URL: https://github.com/apache/thrift/pull/1583#discussion_r212176596
##########
File path: lib/py/src/server/TServer.py
##########
@@ -158,7 +176,15 @@ def serveClient(self, client):
itrans = self.inputTransportFactory.getTransport(client)
otrans = self.outputTransportFactory.getTransport(client)
iprot = self.inputProtocolFactory.getProtocol(itrans)
- oprot = self.outputProtocolFactory.getProtocol(otrans)
+
+ # for THeaderProtocol, we must use the same protocol instance for input
+ # and output so that the response is in the same dialect that the
+ # server detected the request was in.
Review comment:
It would be nicer to inform the users that we're ignoring
`outputProtocolFactory` if they explicitly provided one
(`self.inputProtocolFactory != self.outputProtocolFactory` would suffice to
tell if they did ?).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> THeader for Python
> ------------------
>
> Key: THRIFT-4621
> URL: https://issues.apache.org/jira/browse/THRIFT-4621
> Project: Thrift
> Issue Type: New Feature
> Components: Python - Library
> Reporter: Neil Williams
> Priority: Minor
>
> I'm interested in porting THeader for the Python library. If that sounds OK,
> I'll have a PR ready in not too long.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)