-
Notifications
You must be signed in to change notification settings - Fork 46
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
python3-fastrpc and xmlrpc.client compatibility #33
Comments
The way loads handles data is dependent on fastRPC library itself, which is trying to be smart, deciding whether it should use Binary or XML based unmarshaller by looking at the stream length and first 2 bytes. You can craft arbitary length sequences that will pass as valid data, for example I don't currently see a way to enforce Binary unmarshaller to force the validation, I'll see what I can do here. |
I found the reason the faultCode is sometimes unset - there is no guarantee the faultCode will be the first element in the xml stream:
or
The code that parses the fault is not able to handle the faultCode if it comes as a second value. |
ok, but it's a bug, right? and should be fixed in major 8 version?
would be nice to have some parameter in |
Yep, it's a bug. I'll fix it in frpc8. I'll look into the kwargs for |
We decided not to change the behavior of The |
|
and the behavior is: When method is not set, returns non-tuple, when method is set, returns tuple? |
Yes. There is unknown amount of code that relies on the current behavior. |
ok, I will wrap this for myself as well |
commit 20baaf8 Author: Filip Volejnik <[email protected]> Date: Tue Jun 14 08:54:55 2016 +0200 forgotten python changelog commit ed1661d Author: Filip Volejnik <[email protected]> Date: Mon Jun 13 10:52:08 2016 +0200 #! v8.0.0-rc2 commit 7dd55dd Author: Filip Volejnik <[email protected]> Date: Wed Jun 8 10:38:23 2016 +0200 Fixing format string warnings. commit 5772fa9 Author: Filip Volejnik <[email protected]> Date: Wed Jun 8 10:25:58 2016 +0200 Transitioned to explicit {Error_t,...}::format call for va_args style exceptions. Fixes possible nasty implicit casting errors. commit 39b99e8 Author: Filip Volejnik <[email protected]> Date: Wed Jun 8 07:59:18 2016 +0200 Don't ever return a nullptr as reference. Throws Fault_t as it should when unmarshalled data is null and value is requested by reference. commit 39c3637 Author: Filip Volejnik <[email protected]> Date: Thu Jun 2 15:12:27 2016 +0200 8.0.0-rc1 commit 1a9a656 Author: Filip Volejnik <[email protected]> Date: Thu Jun 2 14:57:33 2016 +0200 fixed lib versioning for frpc8 commit 580081f Author: Filip Volejnik <[email protected]> Date: Thu Jun 2 14:39:53 2016 +0200 rolling back the 8.0 versioning, will be re-added in rc1 release commit f0192c8 Author: Filip Volejnik <[email protected]> Date: Thu Jun 2 13:58:32 2016 +0200 missing include added commit 24d454d Author: Filip Volejnik <[email protected]> Date: Thu Jun 2 13:11:14 2016 +0200 Missing protocol test added commit 01f566c Author: Filip Volejnik <[email protected]> Date: Thu Jun 2 10:14:41 2016 +0200 Allow kwargs in loads. Added new optional parameter useBinary (True, False, None) that specifies if the loads should enforce binary decoding. commit 569215d Author: Filip Volejnik <[email protected]> Date: Wed Jun 1 13:00:51 2016 +0200 Fix for #33 - don't depend on xml node ordering when building a fault object. commit af53fdb Author: Filip Volejnik <[email protected]> Date: Wed Jun 1 12:16:19 2016 +0200 Cleanup, formatting commit 5b5f729 Author: Filip Volejnik <[email protected]> Date: Thu May 26 13:08:52 2016 +0200 Fix for #24. Removed the enclosing, one element array from the result structure commit 48965f7 Author: Filip Volejnik <[email protected]> Date: Thu May 26 09:04:12 2016 +0200 fixes to the python3 version of the python bindings commit 4ab6e22 Author: Filip Volejnik <[email protected]> Date: Thu May 26 08:43:36 2016 +0200 Switched the nativeBoolean to be true by default, meaning fastrpc will implicitly use native python bool as a default commit 4cfe8e4 Author: Filip Volejnik <[email protected]> Date: Wed May 25 10:18:13 2016 +0200 renamed configure.in to configure.ac commit 0fb7330 Author: Filip Volejnik <[email protected]> Date: Wed May 25 10:17:42 2016 +0200 added tests for base64 and protocol changes, runnable via 'make check' commit 09e22e7 Author: Filip Volejnik <[email protected]> Date: Tue May 24 14:48:08 2016 +0200 #28 finished the changes needed to implement the new protocol version commit 4169e9c Author: Filip Volejnik <[email protected]> Date: Fri May 20 11:34:02 2016 +0200 Implemented zigzag int decoding. Rised the maximal protocol major version handled by decoder commit b3a39e7 Author: Filip Volejnik <[email protected]> Date: Wed May 18 14:49:06 2016 +0200 pc file rename fix commit f1aed03 Author: Filip Volejnik <[email protected]> Date: Wed May 18 14:10:06 2016 +0200 Revert "versioned pc file" This reverts commit 570eb77. commit de15ffa Author: Filip Volejnik <[email protected]> Date: Wed May 18 14:09:59 2016 +0200 Revert "versioned dev package" This reverts commit 5048b88. commit d306624 Author: Filip Volejnik <[email protected]> Date: Wed May 18 14:02:54 2016 +0200 removed todo, that part was already implemented commit 7524567 Author: Filip Volejnik <[email protected]> Date: Wed May 18 14:02:31 2016 +0200 Missed this rename commit 5a15326 Author: Filip Volejnik <[email protected]> Date: Wed May 18 13:24:44 2016 +0200 Untested: implementation of custom headers in python bindings commit 6467945 Author: Filip Volejnik <[email protected]> Date: Wed May 18 13:23:58 2016 +0200 adding zigzagDecode routine (to be used by int decoder for protocol version 3) commit 0f9af39 Author: Filip Volejnik <[email protected]> Date: Wed May 18 13:23:12 2016 +0200 Typo fix commit 3b20557 Author: Filip Volejnik <[email protected]> Date: Wed May 18 13:22:44 2016 +0200 Preparations for protocol change. Datetime packing/unpacking implemented (untested) commit 763eda7 Author: Filip Volejnik <[email protected]> Date: Wed May 18 13:02:13 2016 +0200 INSTALL file update commit ef4b506 Merge: 7e57e59 aa1649d Author: Filip Volejnik <[email protected]> Date: Tue May 17 09:56:47 2016 +0200 Merge branch 'master' into fastrpc8 commit 7e57e59 Author: Filip Volejnik <[email protected]> Date: Tue May 10 15:17:08 2016 +0200 Fixes for new gcc narrowing checks commit daebc86 Merge: 36ade14 6aaefcc Author: Filip Volejnik <[email protected]> Date: Wed May 4 09:25:08 2016 +0200 Merge branch 'master' into fastrpc8 commit 36ade14 Author: Filip Volejnik <[email protected]> Date: Mon May 2 10:27:40 2016 +0200 Manual reimplementation of d4392cb, 920f2f2 commit 0c884c2 Author: Ondrej Kocian <[email protected]> Date: Tue Jun 24 13:35:37 2014 +0200 library name link fixed commit 6322845 Author: Ondrej Kocian <[email protected]> Date: Thu May 15 11:33:42 2014 +0200 missing include sstream commit 5048b88 Author: Ondrej Kocian <[email protected]> Date: Mon May 26 11:30:28 2014 +0200 versioned dev package commit c0be579 Author: Ondrej Kocian <[email protected]> Date: Mon May 26 15:51:26 2014 +0200 Vcs info commit 570eb77 Author: Filip Volejnik <[email protected]> Date: Mon May 2 09:47:56 2016 +0200 versioned pc file commit 3f7aea2 Author: Ondrej Kocian <[email protected]> Date: Sun May 4 22:16:27 2014 +0200 WIP: merged the custom headers code into master branch, preparations for version 8
fastrpc does not return tuple, when method name is not provided
it is ok when method name is set
fastrpc raises
RuntimeError: Parser error:< Empty document >
but only on strings more than 3 chars long:Otherwise no error occures
So there is no chance how to recognize parse error, or validly returned None with no method name..
Loading xmlrpc.client.Fault with fastrpc fails to set faultCode - that means it is not possible to use fastrpc on xml documents generated with xmlrpc lib
The text was updated successfully, but these errors were encountered: