Closed drammelt closed 3 years ago
From the slinktool changelog
Do not send terminating NULL characters in command strings sent to the server. The protocol stipulates that commands must be terminated with a carriage return (\r) followed by an optional new line (\n). The library now strictly terminates commands with only a carriage return.
Unfortunately seedlink doesn't have a real specification, so it is hard know how all servers behave, much less to enforce things like this. I can update the code to allow \r, \n or \r\n as line endings.
Fixed in https://github.com/crotwell/seisFile/commit/31839c0334c264a38b834fa8dc77e59fc3062f20
released in ver 2.0.1
SeedLinkReader expects \r\n ending and throws an exception if the \n does not follow the \r
We have a server that only outputs the \r and works fine with the tool we have been using until now, slinktool from https://ds.iris.edu/ds/nodes/dmc/software/downloads/slinktool
My expectation is that the parser would end if either a \r or \n is found as this would match all line ending formats and if the \n is missing it is irrelevant. This would also mean the exception is not needed.
So is the \n absolutely necessary to conform with the mseed format?