[ 
https://issues.apache.org/jira/browse/THRIFT-4621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16592048#comment-16592048
 ] 

ASF GitHub Bot commented on THRIFT-4621:
----------------------------------------

spladug commented on a change in pull request #1583: THRIFT-4621 Add THeader 
for Python
URL: https://github.com/apache/thrift/pull/1583#discussion_r212690451
 
 

 ##########
 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:
   Cool, makes sense. I've added a check to the `TServer` constructor to yell 
at the user if they explicitly pass a mix of `THeaderProtocolFactory` and 
another factory. Is that what you had in mind?

----------------------------------------------------------------
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)

Reply via email to