Coder Social home page Coder Social logo

davkit's People

Contributors

mattrajca avatar mikeabdullah avatar sylverb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

davkit's Issues

CFNetwork SSLHandshake failed (-9819)

i try to integrate davkit with my ios App but when i try to connect to my webdav server i get the 404 Error , Here is my code

NSString root = @"https://137998.webdav.cloudsafe.com/test";
DAVCredentials *credentials = [DAVCredentials credentialsWithUsername:@"[email protected]" password:@"BXWHE6-HPHDSM-RXTIJW"];
DAVSession *session = [[DAVSession alloc] initWithRootURL:[NSURL URLWithString:root] credentials:credentials];
DAVRequest
davRequest = [[DAVListingRequest alloc] initWithPath:root];
davRequest.delegate = self;
[session enqueueRequest:davRequest];

Support HTTP Digest authentication

Many WebDAV servers use HTTP Digest authentication over HTTP Basic authentication for security reasons. The WebDAV spec itself even makes Digest authentication mandatory (at least when using insecure connections): http://www.webdav.org/specs/rfc4918.html#rfc.section.20.1

Would be great to see this implemented.
Thanks for the cool framework anyway โ€“ works like a charm (with HTTP Basic authentication).

-- Michael

contentLength incorrect for files bigger than 2GB

some NSInteger have to be changed to "long long" :
in DAVListingParser.m :
else if ([elementName isEqualToString:@"getcontentlength"]) {

  • _currentItem.contentLength = [_currentString intValue];
  • _currentItem.contentLength = [_currentString longLongValue];
    }

DAVResponseItem.h :

  • NSInteger contentLength;
  • long long contentLength;

-@Property (assign) NSInteger contentLength;
+@Property (assign) long long contentLength;

DAVResponseItem.m :

  • return [NSString stringWithFormat:@"href = %@; modificationDate = %@; contentLength = %d; "
    +- (NSString *)description {
    return [NSString stringWithFormat:@"href = %@; modificationDate = %@; contentLength = %lld; "

Memory leak in DAVListingParser

Hi there,

It seems [DAVListingParser parser: didStartElement: namespaceURI: qualifiedName: attributes:] generates a memory leak on _currentString in some cases. The leak happens when _currentString is not nil at the beginning of this method (in this case, it is always "\n", not sure where it comes from).

Adding
[currentString release];
just before
currentString = [[NSMutableString alloc] init];
does the trick.

By the way, keep up the good work!

Authentication Challenge can loop forever, thus the request appears to hang

If you try to access a resource with the wrong credentials, you will be stuck in a challenge/response loop, since connection:didReceiveAuthenticationChallenge does not evaluate the previousFailureCount field.

I fixed that in my code by adding:

if ( [challenge previousFailureCount] > DEFAULT_AUTHENTICATION_RETRY )
{
    NSError* error = [NSError errorWithDomain:DAVClientErrorDomain code:404 userInfo:nil];
    [self _didFail:error];
    return;
}

Cheers,

:M:

Usage in swift project

Hi,

what is the best way to include DAVKit into a swift project? Should I include the project-file or should I just copy the Source-folder?

Thanks in advance,
Max

Adding decoding of getlastmodified

Thanks for this great library !
I'm testing it on my iPhone and I've found a little problem with it :
when doing a DAVListingRequest, DAVKit is trying to decode "modificationdate" which is not in the webdav answer from my server ! Instead I got "getlastmodified" (which is following RFC1123 specification) :
lp1:getlastmodifiedWed, 16 Feb 2011 07:45:21 GMT/lp1:getlastmodified
Shouldn't you consider also this tag when analyzing answer ? (check https://gist.github.com/253828 for RCF1123 to NSDate conversion)
I can send you a patch for this if needed !

Don't use hardcoded XML namespace prefixes

In DAVListingParser.m attribute names are compared including their namespace prefix:

if ([elementName isEqualToString:@"D:href"]) {...}

That is bound to fail in some cases since the namespace prefix is variable and can be set to the creator's liking.

I'll create a patch implementing

- (void)parser:(NSXMLParser *)parser didStartMappingPrefix:(NSString *)prefix toURI:(NSString *)namespaceURI

and will provide it here.

-- Michael

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.