[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Undesired CRLFs coming from http.request (LuaSocket)
- From: "Stuart P. Bentley" <stuart@...>
- Date: Tue, 21 Feb 2012 07:00:34 -0800
I'm trying to get a JPEG image through an http.request call, but when I
look at the body, something in the chain has gone and changed all the 0A
bytes to 0D0A, corrupting the image.
local body, code, headers, status = http.request
local file = io.open("corrupt-jpeg.jpg",'w')
You can open the file that outputs to see how it's being corrupted (and
you can check that it's line-ending coercion in a hex editor).
Any ideas for how to fix?