Giter Club home page Giter Club logo

Comments (11)

mikeabdullah avatar mikeabdullah commented on August 17, 2024

Hello, can you implement your delegate to gather the full transcript and post that here too, please? That should give some more idea why it's failing.

from connectionkit.

mmackh avatar mmackh commented on August 17, 2024

Sorry I couldn't post a cleaner log - is this what you wanted?

2013-05-09 00:45:00.446 Orbitink[2061:780b] STATE: INIT => CONNECT handle 0x1015d8390; line 1001 (connection #-5000)
2013-05-09 00:45:00.446 Orbitink[2061:4503] About to connect() to 192.168.100.178 port 21 (#0)
2013-05-09 00:45:00.446 Orbitink[2061:1803] Trying 192.168.100.178...
2013-05-09 00:45:00.446 Orbitink[2061:5807] Adding handle: conn: 0x1020df200
2013-05-09 00:45:00.447 Orbitink[2061:780b] Adding handle: send: 0
2013-05-09 00:45:00.447 Orbitink[2061:4503] Adding handle: recv: 0
2013-05-09 00:45:00.447 Orbitink[2061:1803] Curl_addHandleToPipeline: length: 1
2013-05-09 00:45:00.447 Orbitink[2061:5807] 0x100927600 is at send pipe head!
2013-05-09 00:45:00.447 Orbitink[2061:780b] - Conn 0 (0x1020df200) send_pipe: 1, recv_pipe: 0
2013-05-09 00:45:00.448 Orbitink[2061:4503] STATE: CONNECT => WAITCONNECT handle 0x1015d8390; line 1048 (connection #0)
2013-05-09 00:45:00.520 Orbitink[2061:780b] Connected to 192.168.100.178 (192.168.100.178) port 21 (#0)
2013-05-09 00:45:00.520 Orbitink[2061:1803] STATE: WAITCONNECT => PROTOCONNECT handle 0x1015d8390; line 1161 (connection #0)
2013-05-09 00:45:00.520 Orbitink[2061:4503] FTP 0x1020df710 (line 3260) state change from STOP to WAIT220
2013-05-09 00:45:00.595 Orbitink[2061:780b] 220 (vsFTPd 2.3.5)

2013-05-09 00:45:00.595 Orbitink[2061:4503] USER ftpuser

2013-05-09 00:45:00.595 Orbitink[2061:1803] FTP 0x1020df710 (line 843) state change from WAIT220 to USER
2013-05-09 00:45:00.667 Orbitink[2061:780b] 331 Please specify the password.

2013-05-09 00:45:00.667 Orbitink[2061:4503] PASS ####
2013-05-09 00:45:00.667 Orbitink[2061:1803] FTP 0x1020df710 (line 2635) state change from USER to PASS
2013-05-09 00:45:00.773 Orbitink[2061:780b] 230 Login successful.

2013-05-09 00:45:00.773 Orbitink[2061:4503] PWD

2013-05-09 00:45:00.773 Orbitink[2061:1803] FTP 0x1020df710 (line 855) state change from PASS to PWD
2013-05-09 00:45:00.842 Orbitink[2061:780b] 257 "/var/www"

2013-05-09 00:45:00.842 Orbitink[2061:4503] Entry path is '/var/www'
2013-05-09 00:45:00.842 Orbitink[2061:1803] FTP 0x1020df710 (line 2952) state change from PWD to STOP
2013-05-09 00:45:00.843 Orbitink[2061:5807] protocol connect phase DONE
2013-05-09 00:45:00.843 Orbitink[2061:780b] STATE: PROTOCONNECT => DO handle 0x1015d8390; line 1180 (connection #0)
2013-05-09 00:45:00.843 Orbitink[2061:4503] DO phase starts
2013-05-09 00:45:00.843 Orbitink[2061:1803] CWD ..

2013-05-09 00:45:00.843 Orbitink[2061:5807] FTP 0x1020df710 (line 942) state change from STOP to CWD
2013-05-09 00:45:00.844 Orbitink[2061:780b] STATE: DO => DOING handle 0x1015d8390; line 1240 (connection #0)
2013-05-09 00:45:00.912 Orbitink[2061:4503] CWD orbitink

2013-05-09 00:45:00.912 Orbitink[2061:780b] 250 Directory successfully changed.

2013-05-09 00:45:00.983 Orbitink[2061:4503] CWD blog

2013-05-09 00:45:00.983 Orbitink[2061:780b] 250 Directory successfully changed.

2013-05-09 00:45:01.052 Orbitink[2061:4503] Server denied you to change to the given directory
2013-05-09 00:45:01.052 Orbitink[2061:780b] 550 Failed to change directory.

2013-05-09 00:45:01.052 Orbitink[2061:1803] DO phase failed

from connectionkit.

mikeabdullah avatar mikeabdullah commented on August 17, 2024

Well that's pretty odd. It looks like some of the transcript is out-of-order (might well be my fault, not sure I'm properly dispatching it to the delegate).

So I take that to show that the blog directory doesn't exist, whereupon the operation fails. Which is odd, since libcurl is supposed to at least try creating it at that point. I'll have a play to see if there's anything obviously wrong in our code for that.

from connectionkit.

mmackh avatar mmackh commented on August 17, 2024

Thank you - let me know if you need any other information.

from connectionkit.

mmackh avatar mmackh commented on August 17, 2024

I did a bit of research, maybe it's because of active vs passive ftp connections. Can I flip the switch on this on a higher level?

from connectionkit.

mikeabdullah avatar mikeabdullah commented on August 17, 2024

That sounds unlikely to me. No data connection has even been attempted at this point. libcurl supports both active and passive, but I'm only interested in supporting passive in ConnectionKit.

from connectionkit.

mmackh avatar mmackh commented on August 17, 2024

I found my error - I was trying to get contentsOfDirectoryAtURL before uploading to verify the credentials. Sorry about that. Is there a standard method for checking credentials somewhere?

from connectionkit.

mikeabdullah avatar mikeabdullah commented on August 17, 2024

There is not; just go ahead and try the upload. If the credentials are incorrect, it will fail accordingly.

from connectionkit.

mikeabdullah avatar mikeabdullah commented on August 17, 2024

I've stopped using a global queue for transcript messages now, so they should always arrive in-order. Thanks for bringing that to light.

from connectionkit.

mmackh avatar mmackh commented on August 17, 2024

I guess one other thing: The delegates that are called from within the completion handler are not called on the main thread - is this standard behaviour?

from connectionkit.

mikeabdullah avatar mikeabdullah commented on August 17, 2024

Yes. Completion handlers and delegate methods are performed on arbitrary threads/queues. It is your app's responsibility to bounce over to another thread if desired.

There's a note about the delegate methods in the headers already, but I'll update the docs to be a little clearer.

from connectionkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.