You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Michael Stockton (JIRA)" <ji...@apache.org> on 2009/01/09 00:56:59 UTC
[jira] Created: (THRIFT-254) Add optional strict version support to
binary protocols
Add optional strict version support to binary protocols
-------------------------------------------------------
Key: THRIFT-254
URL: https://issues.apache.org/jira/browse/THRIFT-254
Project: Thrift
Issue Type: Improvement
Components: Library (Ruby)
Reporter: Michael Stockton
Priority: Minor
Attachments: thrift-254.patch
Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
For example:
Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-254) Add optional strict version support to
binary protocols
Posted by "Michael Stockton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Stockton updated THRIFT-254:
------------------------------------
Attachment: thrift-254.patch
> Add optional strict version support to binary protocols
> -------------------------------------------------------
>
> Key: THRIFT-254
> URL: https://issues.apache.org/jira/browse/THRIFT-254
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Ruby)
> Reporter: Michael Stockton
> Priority: Minor
> Attachments: thrift-254.patch
>
>
> Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
> This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
> For example:
> Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-254) Add optional strict version support
to binary protocols
Posted by "Kevin Clark (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663059#action_12663059 ]
Kevin Clark commented on THRIFT-254:
------------------------------------
This generally looks fine. In BinaryProtocol#read_message_begin, why do you switch to use trans.read_all(version) instead of read_string? I could understand using read_all, if you knew the length of the string, but it doesn't look like that's happening either.
> Add optional strict version support to binary protocols
> -------------------------------------------------------
>
> Key: THRIFT-254
> URL: https://issues.apache.org/jira/browse/THRIFT-254
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Ruby)
> Reporter: Michael Stockton
> Priority: Minor
> Attachments: thrift-254.patch
>
>
> Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
> This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
> For example:
> Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-254) Add optional strict version support
to binary protocols
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663112#action_12663112 ]
Bryan Duxbury commented on THRIFT-254:
--------------------------------------
The patch looks alright. I couldn't really find anything to complain about. +1
> Add optional strict version support to binary protocols
> -------------------------------------------------------
>
> Key: THRIFT-254
> URL: https://issues.apache.org/jira/browse/THRIFT-254
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Ruby)
> Reporter: Michael Stockton
> Priority: Minor
> Attachments: thrift-254.patch
>
>
> Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
> This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
> For example:
> Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-254) Add optional strict version support
to binary protocols
Posted by "Kevin Clark (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670537#action_12670537 ]
Kevin Clark commented on THRIFT-254:
------------------------------------
In r740930. Thanks a lot!
> Add optional strict version support to binary protocols
> -------------------------------------------------------
>
> Key: THRIFT-254
> URL: https://issues.apache.org/jira/browse/THRIFT-254
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Ruby)
> Reporter: Michael Stockton
> Priority: Minor
> Fix For: 0.1
>
> Attachments: thrift-254-v2.patch, thrift-254-v3.patch, thrift-254.patch
>
>
> Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
> This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
> For example:
> Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (THRIFT-254) Add optional strict
version support to binary protocols
Posted by "Michael Stockton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670608#action_12670608 ]
michaelstockton edited comment on THRIFT-254 at 2/4/09 6:33 PM:
-----------------------------------------------------------------
Perl/Haskell. I didn't check Smalltalk. Should the strict read/write defaults be the same between languages? I think the variance we have causes confusion. Moreover, the language used in ProtocolException to indicate a bad version -- which seems fairly standard between implementations -- isn't intuitive. In my situation, I had to dig into thrift to figure out why my ruby client couldn't interface with a php server.
was (Author: michaelstockton):
Perl/Haskell. I didn't check Smalltalk. Shouldn't the strict read/write defaults be the same between languages? I think the variance we have causes confusion. Moreover, the language used in ProtocolException to indicate a bad version -- which seems fairly standard between implementations -- isn't intuitive. In my situation, I had to dig into thrift to figure out why my ruby client couldn't interface with a php server.
> Add optional strict version support to binary protocols
> -------------------------------------------------------
>
> Key: THRIFT-254
> URL: https://issues.apache.org/jira/browse/THRIFT-254
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Ruby)
> Reporter: Michael Stockton
> Priority: Minor
> Fix For: 0.1
>
> Attachments: thrift-254-v2.patch, thrift-254-v3.patch, thrift-254.patch
>
>
> Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
> This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
> For example:
> Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-254) Add optional strict version support
to binary protocols
Posted by "Michael Stockton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663095#action_12663095 ]
Michael Stockton commented on THRIFT-254:
-----------------------------------------
I think trans.read_all(version) must be used because version contains the first 32 bits of data which acts as a string size. read_string would pull and additional 32 bits on top of "version = read_i32".
> Add optional strict version support to binary protocols
> -------------------------------------------------------
>
> Key: THRIFT-254
> URL: https://issues.apache.org/jira/browse/THRIFT-254
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Ruby)
> Reporter: Michael Stockton
> Priority: Minor
> Attachments: thrift-254.patch
>
>
> Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
> This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
> For example:
> Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-254) Add optional strict version support
to binary protocols
Posted by "Michael Stockton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670608#action_12670608 ]
Michael Stockton commented on THRIFT-254:
-----------------------------------------
Perl/Haskell. I didn't check Smalltalk. Shouldn't the strict read/write defaults be the same between languages? I think the variance we have causes confusion. Moreover, the language used in ProtocolException to indicate a bad version -- which seems fairly standard between implementations -- isn't intuitive. In my situation, I had to dig into thrift to figure out why my ruby client couldn't interface with a php server.
> Add optional strict version support to binary protocols
> -------------------------------------------------------
>
> Key: THRIFT-254
> URL: https://issues.apache.org/jira/browse/THRIFT-254
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Ruby)
> Reporter: Michael Stockton
> Priority: Minor
> Fix For: 0.1
>
> Attachments: thrift-254-v2.patch, thrift-254-v3.patch, thrift-254.patch
>
>
> Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
> This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
> For example:
> Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-254) Add optional strict version support to
binary protocols
Posted by "Michael Stockton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Stockton updated THRIFT-254:
------------------------------------
Attachment: thrift-254-v2.patch
> Add optional strict version support to binary protocols
> -------------------------------------------------------
>
> Key: THRIFT-254
> URL: https://issues.apache.org/jira/browse/THRIFT-254
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Ruby)
> Reporter: Michael Stockton
> Priority: Minor
> Attachments: thrift-254-v2.patch, thrift-254.patch
>
>
> Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
> This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
> For example:
> Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-254) Add optional strict version support
to binary protocols
Posted by "Kevin Clark (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662484#action_12662484 ]
Kevin Clark commented on THRIFT-254:
------------------------------------
I'd support a change like this. I'll review the code today, and get you some feedback. Thanks!
> Add optional strict version support to binary protocols
> -------------------------------------------------------
>
> Key: THRIFT-254
> URL: https://issues.apache.org/jira/browse/THRIFT-254
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Ruby)
> Reporter: Michael Stockton
> Priority: Minor
> Attachments: thrift-254.patch
>
>
> Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
> This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
> For example:
> Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-254) Add optional strict version support
to binary protocols
Posted by "David Reiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670589#action_12670589 ]
David Reiss commented on THRIFT-254:
------------------------------------
Which libraries don't read the version by default. That should be fixed.
> Add optional strict version support to binary protocols
> -------------------------------------------------------
>
> Key: THRIFT-254
> URL: https://issues.apache.org/jira/browse/THRIFT-254
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Ruby)
> Reporter: Michael Stockton
> Priority: Minor
> Fix For: 0.1
>
> Attachments: thrift-254-v2.patch, thrift-254-v3.patch, thrift-254.patch
>
>
> Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
> This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
> For example:
> Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (THRIFT-254) Add optional strict version support
to binary protocols
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury reassigned THRIFT-254:
------------------------------------
Assignee: Michael Stockton
> Add optional strict version support to binary protocols
> -------------------------------------------------------
>
> Key: THRIFT-254
> URL: https://issues.apache.org/jira/browse/THRIFT-254
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Ruby)
> Reporter: Michael Stockton
> Assignee: Michael Stockton
> Priority: Minor
> Fix For: 0.1
>
> Attachments: thrift-254-v2.patch, thrift-254-v3.patch, thrift-254.patch
>
>
> Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
> This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
> For example:
> Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-254) Add optional strict version support
to binary protocols
Posted by "David Reiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670612#action_12670612 ]
David Reiss commented on THRIFT-254:
------------------------------------
Am I just missing something? In BinaryProtocol.pm, readMessageBegin checks the version mask. I don't know Haskell, but I'm pretty sure that this convention of checking for the version (which is what strict_write writes) was established before the Haskell or Smalltalk libraries were written.
Let me clarify the intended meaning of strict_read and strict_write to make sure we are all on the same page.
strict_write: write a version number (with embedded message type) before the method name. (strict_write being off means the method name comes first, followed by a one-byte message type).
strict_read: Only accept messages with the leading version number. (strict_read being off *should* mean that it accepts both versions.)
I think the defaults should be strict_read off, strict_write on. Maybe for our next release, once everyone is using strict_write, we can just drop the old version entirely. In any case, if there is any library that *cannot* accept the strict_write style (leading version number), that is a bug.
> Add optional strict version support to binary protocols
> -------------------------------------------------------
>
> Key: THRIFT-254
> URL: https://issues.apache.org/jira/browse/THRIFT-254
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Ruby)
> Reporter: Michael Stockton
> Priority: Minor
> Fix For: 0.1
>
> Attachments: thrift-254-v2.patch, thrift-254-v3.patch, thrift-254.patch
>
>
> Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
> This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
> For example:
> Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-254) Add optional strict version support
to binary protocols
Posted by "Michael Stockton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663063#action_12663063 ]
Michael Stockton commented on THRIFT-254:
-----------------------------------------
The php and python libraries make use of read_all. I assumed there was a good reason why. I'm happy to change over to read_string. I'll submit another patch later today.
> Add optional strict version support to binary protocols
> -------------------------------------------------------
>
> Key: THRIFT-254
> URL: https://issues.apache.org/jira/browse/THRIFT-254
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Ruby)
> Reporter: Michael Stockton
> Priority: Minor
> Attachments: thrift-254.patch
>
>
> Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
> This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
> For example:
> Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (THRIFT-254) Add optional strict version support to
binary protocols
Posted by "Kevin Clark (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Clark closed THRIFT-254.
------------------------------
Resolution: Fixed
Fix Version/s: 0.1
> Add optional strict version support to binary protocols
> -------------------------------------------------------
>
> Key: THRIFT-254
> URL: https://issues.apache.org/jira/browse/THRIFT-254
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Ruby)
> Reporter: Michael Stockton
> Priority: Minor
> Fix For: 0.1
>
> Attachments: thrift-254-v2.patch, thrift-254-v3.patch, thrift-254.patch
>
>
> Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
> This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
> For example:
> Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-254) Add optional strict version support to
binary protocols
Posted by "Michael Stockton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Stockton updated THRIFT-254:
------------------------------------
Attachment: thrift-254-v3.patch
Adjustment for fix made in THRIFT-302.
> Add optional strict version support to binary protocols
> -------------------------------------------------------
>
> Key: THRIFT-254
> URL: https://issues.apache.org/jira/browse/THRIFT-254
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Ruby)
> Reporter: Michael Stockton
> Priority: Minor
> Attachments: thrift-254-v2.patch, thrift-254-v3.patch, thrift-254.patch
>
>
> Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
> This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
> For example:
> Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-254) Add optional strict version support
to binary protocols
Posted by "David Reiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670601#action_12670601 ]
David Reiss commented on THRIFT-254:
------------------------------------
Yeah, but strict_read = false means that it accepts the old or the new format. Is there any library that can't accept the "strict_write" format when reading?
> Add optional strict version support to binary protocols
> -------------------------------------------------------
>
> Key: THRIFT-254
> URL: https://issues.apache.org/jira/browse/THRIFT-254
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Ruby)
> Reporter: Michael Stockton
> Priority: Minor
> Fix For: 0.1
>
> Attachments: thrift-254-v2.patch, thrift-254-v3.patch, thrift-254.patch
>
>
> Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
> This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
> For example:
> Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-254) Add optional strict version support
to binary protocols
Posted by "Michael Stockton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670615#action_12670615 ]
Michael Stockton commented on THRIFT-254:
-----------------------------------------
Ok, I see what you're getting at. Sorry, I was moving quickly and looked at writeMessageBegin for an indication of version support (usually above readMessage) and I mistook your question as to whether a library does not support both styles.
> Add optional strict version support to binary protocols
> -------------------------------------------------------
>
> Key: THRIFT-254
> URL: https://issues.apache.org/jira/browse/THRIFT-254
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Ruby)
> Reporter: Michael Stockton
> Priority: Minor
> Fix For: 0.1
>
> Attachments: thrift-254-v2.patch, thrift-254-v3.patch, thrift-254.patch
>
>
> Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
> This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
> For example:
> Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-254) Add optional strict version support
to binary protocols
Posted by "Michael Stockton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670599#action_12670599 ]
Michael Stockton commented on THRIFT-254:
-----------------------------------------
Defaults for strict read/write by language:
||language||strict_read||strict_write||
|cocoa|false|true|
|cpp|false|true|
|csharp|false|true|
|erlang|true|true|
|hs|-|-|
|java|false|true|
|perl|true|-|
|php|false|true|
|python|false|true|
|ruby|true|true|
Blanks indicate that strict read/write are not optional.
> Add optional strict version support to binary protocols
> -------------------------------------------------------
>
> Key: THRIFT-254
> URL: https://issues.apache.org/jira/browse/THRIFT-254
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Ruby)
> Reporter: Michael Stockton
> Priority: Minor
> Fix For: 0.1
>
> Attachments: thrift-254-v2.patch, thrift-254-v3.patch, thrift-254.patch
>
>
> Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
> This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
> For example:
> Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-254) Add optional strict version support
to binary protocols
Posted by "Michael Stockton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669802#action_12669802 ]
Michael Stockton commented on THRIFT-254:
-----------------------------------------
I created a new patch that works with the changes made in THRIFT-248. In order to compile my patch to the binary protocol extension, I added an include for stdint.h. Depending on what's decided with THRIFT-298, I can change/remove the include statement. Also, I noticed that a bunch of tests are failing because encode_binary and decode_binary are still being referenced.
> Add optional strict version support to binary protocols
> -------------------------------------------------------
>
> Key: THRIFT-254
> URL: https://issues.apache.org/jira/browse/THRIFT-254
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Ruby)
> Reporter: Michael Stockton
> Priority: Minor
> Attachments: thrift-254-v2.patch, thrift-254.patch
>
>
> Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
> This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
> For example:
> Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-254) Add optional strict version support
to binary protocols
Posted by "Kevin Clark (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663107#action_12663107 ]
Kevin Clark commented on THRIFT-254:
------------------------------------
Ah, ok, that makes sense. I think this is fine then, but I'm going to poke some people about additional feedback real quick. I'll push in the next couple days either way.
> Add optional strict version support to binary protocols
> -------------------------------------------------------
>
> Key: THRIFT-254
> URL: https://issues.apache.org/jira/browse/THRIFT-254
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Ruby)
> Reporter: Michael Stockton
> Priority: Minor
> Attachments: thrift-254.patch
>
>
> Several thrift libraries do not read a thrift version number in messages by default. This can cause issues for a ruby user who interacts with thrift services written in other languages because the ruby library doesn't support an option to disable version validation.
> This patch does not change the default behavior, where thrift version numbers are expected, but it does add the option to disable version validation.
> For example:
> Thrift::BinaryProtocol.new(transport, strict_read=false, strict_write=true)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.