Comments (3)
Hi,
looking at the problem, there is a default protocol version 1.0 set after each call if there is no protocolVersion
in the response from server (see src/frpchttpclient.cc:235, the default version is set in src/frpcxmlunarshaller.cc:290).
This limits the usage serverproxy for second and consecutive calls because the default version (FRPC_MAJOR_VERSION_DEFAULT
, FRPC_MINOR_VERSION_DEFAULT
set in ProtocolVersion_t
ctor) is overwritten with 1.0 default.
I'd propose a fix that would set protocolVersion to the pair FRPC_MAJOR_VERSION_DEFAULT
, FRPC_MINOR_VERSION_DEFAULT
if there is no protocolVersion
field in the XML response.
from fastrpc.
If I'm understanding your proposed solution correctly, it would cause the protocol version set in ctor to be kept for consecutive requests. This seems like a sensible solution to the problem so I am all for it.
from fastrpc.
I mean if we can't get any protocol version from the server response, it's the only reasonable course of action, since we already did a call to the server before validating the protocol version anyway.
Commenting out the else branch in frpcxmlunarshaller.cc should also work.
from fastrpc.
Related Issues (20)
- Python 2.7 binary data and strings don't handle same way
- python-fastrpc: unworking sdist package
- Wrong Datetime serialisation HOT 3
- Unable to get server address from existing ServerProxy object
- Null serialisation vs specification HOT 1
- Debian package for python-fastrpc 8.0.1 cant be installed because of syntax errors HOT 4
- Segfault on cyclic reference
- non-normalized bool values cause frpc binary serializer to produce gibberish
- Missing python-fastrpc 8.0.3 in pypi
- Where can I get python setup.py dependencies?
- Python setup.py should compile the cpp files to create standalone python package
- CI
- Bad docs for Struct_t::erase
- Build Depends v.s. transitive package depends
- Support for application/x-base64-frpc in python handlers HOT 1
- pool.DateTime(time_t, tz) and UTCTime(time_t) are wrong
- python3-fastrpc equal version dependency is not enfoced
- re-do address resolution in case reconnect is needed
- python module dependencies
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastrpc.