Commit Graph

23 Commits

Author SHA1 Message Date
vitalii
a68e21e92b requests: nil pointer dereference panic was fixed [#25]
http.Do() method will return non-nil [error] in following cases:
1. Request is nil
2. Response missing Location header
3. Client failed to parse Location header
4. Method "request.GetBody()" returns error
5. Http.Client.Send() returns error
5. Client timeout was exceeded

Signed-off-by: Christoph Polcin <labs@polcin.de>
2018-10-21 11:15:52 +02:00
Christoph Polcin
3cd755d6c4 make check api 2018-07-14 01:55:58 +02:00
Vitalii
83e3d1e31e Creating parent collection method was added (#22)
* method for creating parent collection was added to Client struct

"func (c *Client) createParentCollection(itemPath string) error" was added to request.go file

* using Client's method to create parent collection

in following methods:
Client.Write()
Client.WriteStream()
Client.copymove()

deadlock is impossible in method Client.copymove() because of paragraph #6 section 9.8.5 (https://tools.ietf.org/html/rfc4918#section-9.8.5) and paragraph #6 section 9.9.4 (https://tools.ietf.org/html/rfc4918#section-9.9.4) of RFC 4918 (https://tools.ietf.org/html/rfc4918)

* install dependencies script was added to Travis-CI file

* testing was added to Travis-CI file

* error wrapping was removed from Client.put() method

* using an early return on error in case of 409 in Client.Write() method
2018-07-14 01:48:30 +02:00
Vitalii
f43a0a4cf8 quick bugfix for issue #20 (#21)
issue title: "Can't upload file with content"
https://github.com/studio-b12/gowebdav/issues/20
2018-07-08 14:25:00 +02:00
Christoph Polcin
c4c24955e1 update README 2018-06-19 08:43:13 +02:00
David
b45378c08f Check status on every request to fix #14 2018-06-18 10:02:01 -05:00
misha-plus
9ff8e33634 fix authorization 2018-06-10 11:01:51 +02:00
David
6d8c168f72 Add Authenticator interface and Digest auth support 2018-05-25 22:40:13 +02:00
Christoph Polcin
375f391c8a Escape URL 2018-05-23 13:41:06 +02:00
Shishkin Artem
c49c91989e % and # in the URL 2018-05-22 12:34:34 +02:00
Aaron Bieber
beeefa572c more docs / cleanup 2018-05-16 10:42:53 +02:00
Christoph Polcin
0c00ff98a3 close body 2014-10-27 16:29:57 +01:00
Christoph Polcin
f03693b770 refactor copymove 2014-10-27 16:27:57 +01:00
Christoph Polcin
b947e819ed refactor req & reqDo 2014-10-27 16:19:17 +01:00
Christoph Polcin
e4fac5eebf implement READ & WRITE 2014-10-27 14:32:16 +01:00
Christoph Polcin
1cd7bd1100 ref CopyRename TODOs 2014-10-24 14:09:50 +02:00
Christoph Polcin
47076d6487 add Rename and Copy 2014-10-24 14:09:50 +02:00
Christoph Polcin
f728828956 ReadDir will fail on non collections 2014-10-24 12:39:35 +02:00
Christoph Polcin
544a4735b6 don't export requests 2014-10-23 15:31:34 +02:00
Christoph Polcin
c1fc968bc9 implement MkDir aka MKCOL 2014-10-23 15:00:20 +02:00
Christoph Polcin
d4b8ebb4b2 implement Remove 2014-10-23 14:10:31 +02:00
Christoph Polcin
542e8e73bc refactor func parseXML 2014-10-23 11:29:26 +02:00
Christoph Polcin
95f1f68142 add initial source 2014-10-23 10:39:55 +02:00