Re: FTP client
Pontus Östlund <[email protected]>
| Newsgroups | gmane.comp.lang.pike.user |
|---|---|
| Message-ID | <CAAyMhKxsHtQyqTk2W2Ap5Gjmtvexr3PKqSfpV7mDxOQBef7jjg@mail.gmail.com> |
Sweet, that did it. Thank you! # Pontus 2015-01-16 14:57 GMT+01:00 Chris Angelico <[email protected]>: > On Sat, Jan 17, 2015 at 12:31 AM, Pontus Östlund <[email protected]> > wrote: > > Okey, I now have a simple FTP client that at least seems to be working > > somewhat. The only problem right now is that binary data seems to be > > scrambled in some way since binary files are broken when retrieved and > > written to local disk. Any ideas why? > > > > > https://github.com/poppa/Pike-Modules/blob/master/Protocols.pmod/FTP.pmod > > > > You're using gets(), which expects line-based results. Then you > concatenate them all, and in the process, lose the newlines. > > I've sent you through a GitHub PR with a fix that appears to work on my > system. > > ChrisA > >