It finally seems like the client can correctly handle responses from the server of any length. File transfers are still a little strange. It seems like some extra NULL bytes are being appended to the files being written client side. That's the next thing to fix, I guess.