OpenMath/py-scscp

Server produces incomplete connection initiation message.

Closed this issue · 2 comments

@defeo I was told by @sebasguts about this - please see gap-packages/scscp#9.

Indeed, page 11 of SCSCP 1.3 specification says:

"The format of the control sequence is compulsory, and server implementations must not change the order of the attribute/value pairs nor omit some of them. This strict
restriction makes it sure that even very simple clients should be able to parse this
control sequence."

However, Python SCSCP server produces incomplete connection initiation message: with SetInfoLevel(InfoSCSCP,4) in GAP, I can see that:

gap> GetServiceDescription("localhost",26133);
#I  Creating a socket ...
#I  Connecting to a remote socket via TCP/IP ...
#I  Got connection initiation message
#I  <?scscp scscp_versions="1.3" ?>

An example of a properly formatted connection initiation message returned by a GAP SCSCP server:

gap> GetServiceDescription("localhost",26134);
#I  Creating a socket ...
#I  Connecting to a remote socket via TCP/IP ...
#I  Got connection initiation message
#I  <?scscp service_name="GAP" service_version="4.8.6" service_id="localhost:26134:65854" scscp_versions="1.0 1.1 1.2 1.3" ?>
defeo commented

Thanks, it's fixed.

But why oh why preserve attribute order? This makes the thing more painful, not easier to implement!

Thanks. Maybe we may relax this in the next version of SCSCP - please submit an issue to https://github.com/alex-konovalov/scscp