lionkov / go9p

Package for implementing clients and servers of the 9P and 9P2000 distributed resource protocols in Go.
Other
20 stars 7 forks source link

p/srv: prevent double encoding of errno #46

Closed mischief closed 8 years ago

mischief commented 8 years ago

this one is a little less clear-cut.

right now when encoding Rerrors, a *p.Error is stringified, which puts a string of the errno on the end. when using 9p2000.u, this information is redundant and less parseable, but when using 9p2000, some might argue that having the stringified errno is valueable.

my reasoning for this change is writing integration tests which compare errors. without this change, what the server sends and what the client sees differ by the stringified errno.

i personally am in favor of eliding the stringified errno. if somebody wanted to know errnos while not using 9p2000.u, they can log it server side.