[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Carriage return and process-send-string
From: |
Vibhav Pant |
Subject: |
Carriage return and process-send-string |
Date: |
Thu, 8 Dec 2016 13:27:18 +0530 |
While working on a library for the Language Server Protocol[1] (which
uses \r\n to
separate headers), I found out that `process-send-string` will convert
carriage returns in
the provided string to newlines. As an example, strace shows that
(process-send-string proc
(format "Content-Length: 0\r\n\r\n")
ends up sending
read(0, "Content-Length: 0\n", 8192) = 17
read(0, "\n", 8192) = 1
read(0, "\n", 8192) = 1
read(0, "\n", 8192) = 1
to the process. I tried setting `:coding-system` in `make-process` to
`'no-conversion`, but
this didn't fix the issue. Is this intended behavior? If so, are there
any ways to go around it?
Thanks,
Vibhav
[1] Language Server Protocol:
https://github.com/Microsoft/language-server-protocol
--
Vibhav Pant
address@hidden
- Carriage return and process-send-string,
Vibhav Pant <=