[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Undesired CRLFs coming from http.request (LuaSocket)
- From: David Given <dg@...>
- Date: Tue, 21 Feb 2012 15:05:34 +0000
Stuart P. Bentley wrote:
[...]
> local file = io.open("corrupt-jpeg.jpg",'w')
[...]
> Any ideas for how to fix?
Open with 'wb' instead --- you've told it it's a text file, and it's
doing Unix<->DOS line ending conversion.
--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "I have always wished for my computer to be as easy to use as my
│ telephone; my wish has come true because I can no longer figure out
│ how to use my telephone." --- Bjarne Stroustrup
Attachment:
signature.asc
Description: OpenPGP digital signature