ljedrz
8c89714da9
refactor: simplify one match expression
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-06-26 15:11:05 +02:00
Joonas Koivunen
d1cd15b4ec
Merge pull request #193 from eqlabs/fix_use_tempfile
...
fix test using non-unique tempfile
2020-06-18 01:16:08 +03:00
Joonas Koivunen
3ba5ddf1a3
fix test using non-unique tempfile
2020-06-18 00:55:11 +03:00
Joonas Koivunen
22aaec2377
refactor: remove unshared use
...
unshare was required as hyper was forced to require the body stream to
be Sync due to compiler issue while it was not really needed. Latest
hyper now has this workaround built-in.
2020-06-17 23:07:39 +03:00
Joonas Koivunen
27085b3095
chore: update hyper and warp to latest
2020-06-17 23:07:39 +03:00
Joonas Koivunen
3bfa506f69
refactor: suggestions from code review
...
Including mostly comment fixes and removal of an extra &mut.
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-06-17 17:27:05 +03:00
Joonas Koivunen
9aa9322a33
refactor: remove unused warnings on windows
2020-06-17 17:27:05 +03:00
Joonas Koivunen
24e4c4da42
chore: cargo fmt
2020-06-17 17:27:05 +03:00
Joonas Koivunen
0d2dd477e9
doc: refresh and check out cargo docs
2020-06-17 17:27:05 +03:00
Joonas Koivunen
c874e1165a
fix: windows build
2020-06-17 17:27:05 +03:00
Joonas Koivunen
6be2556341
chore: cargo fmt
2020-06-17 17:27:05 +03:00
Joonas Koivunen
f5ada8728d
add(http): multiblock file /get test
...
this does not hit the buffer cycling cases but hits all other file
cases.
2020-06-17 17:27:05 +03:00
Joonas Koivunen
7e0fcd05b3
refactor(http): more /get test support
2020-06-17 17:27:05 +03:00
Joonas Koivunen
bd6a974db5
refactor: simplify to simple buffer in TarHelper
...
two buffers would allow better reusing, but only with concurrency.
2020-06-17 17:27:05 +03:00
Joonas Koivunen
6eb276eb28
add: test /get for long and file names
2020-06-17 17:27:05 +03:00
Joonas Koivunen
9151834ba3
chore: cleanup warnings, fmt
2020-06-17 17:27:05 +03:00
Joonas Koivunen
350bb9ccf7
fix: hopefully get windows compiling
2020-06-17 17:27:05 +03:00
Joonas Koivunen
92cc2ab353
fix panicing with long link names
2020-06-17 17:27:05 +03:00
Joonas Koivunen
6a96593866
refactor: make Walker easier to use
...
turns out the internal structure almost supported this already, but
`self.current` needed to be done an Option.
2020-06-17 17:27:05 +03:00
Joonas Koivunen
e25a23380c
refactor: split tar helper to own module
2020-06-17 17:27:05 +03:00
Joonas Koivunen
f71c212edd
chore: fmt and clippy warnings
2020-06-17 17:27:05 +03:00
Joonas Koivunen
948eeff48f
refactor: rename FileMetadata to ipfs_unixfs::Metadata
2020-06-17 17:27:05 +03:00
Joonas Koivunen
9b18427e16
refactor: move ipfs_unixfs::dir::walk to top level
2020-06-17 17:27:05 +03:00
Joonas Koivunen
d61b0424d8
fix: use errors instead of unwraps in /get as well
2020-06-17 17:27:05 +03:00
Joonas Koivunen
7feededa81
fix: refs must use new ipfspath.follow_dagpb_data
2020-06-17 17:27:05 +03:00
Joonas Koivunen
3da2bc7028
fix: last cat conformance test failure
2020-06-17 17:27:05 +03:00
Joonas Koivunen
07ae552634
doc: add comments to tar export
2020-06-17 17:27:05 +03:00
Joonas Koivunen
cbd2d4a992
feat: add follow_dagpb_data option to ipfspath
2020-06-17 17:27:05 +03:00
Joonas Koivunen
8ada8370c4
fix: get walking interop tests to complete
2020-06-17 17:27:05 +03:00
Joonas Koivunen
6671e74113
feat: /get http endpoint
...
does not at all pass any tests. we need to add a root path param, which
will be a string version of the requested Cid for the http api. Also,
with this, it becomes possible to hide everything (files, symlinks)
under a single walk api.
2020-06-17 17:26:39 +03:00
Joonas Koivunen
169be7b562
refactor: extract special dagpb handling out
2020-06-11 19:10:46 +03:00
Joonas Koivunen
38e41ff79d
Apply suggestions from code review
...
Forgot this from the first batch..
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-06-11 19:09:47 +03:00
Joonas Koivunen
d5be60249c
Apply suggestions from code review
...
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-06-11 18:55:02 +03:00
Joonas Koivunen
38b7e4bd61
doc: add comments for the long function
2020-06-11 17:20:19 +03:00
Joonas Koivunen
6102488e23
chore: cargo fmt
2020-06-11 16:54:05 +03:00
Joonas Koivunen
31b30cddf5
fix: load the block always on walk_paths
...
this was a curious bug: to pass the test on interface-ipfs-core we need
to be still loading the first block and we must not be on the stream
phase. apparently the http cancellation works differently depending on
whether any response headers have been sent or not as the test fails if
the headers and cancelled error is sent.
the issue of returning either an loaded raw block or possibly projected
Ipld value was solved by introducing yet another enum Loaded. I did
consider `Either` from crate either, and `Result<Box<[u8]>, Ipld>` but
the custom enum at least allows us to write a documentation story what
the alternatives represent.
2020-06-11 16:48:43 +03:00
Joonas Koivunen
2d99d1aed2
fix: adjust default log levels with the addition of a crate
2020-06-11 16:48:20 +03:00
Joonas Koivunen
5fed9c5220
chore: cargo fmt
2020-06-11 13:45:57 +03:00
Joonas Koivunen
b65f6b7590
fix: handle corner case gracefully in walk_path
...
also: the walk_path should become ipfs::resolve(IpfsPath).
2020-06-11 13:44:57 +03:00
Joonas Koivunen
da7f2b4882
fix: get dag tests passing again
...
the remaining issue is how to handle the path resolving for the ugly
error mangling case...
2020-06-11 13:03:40 +03:00
Joonas Koivunen
392840c0ad
chore: cargo fmt
2020-06-10 20:32:58 +03:00
Joonas Koivunen
0aca44906e
refactor: move test case over to ipfs-unixfs
2020-06-10 20:32:58 +03:00
Joonas Koivunen
819d8ebc53
fix: resolve ipfspaths with ipfs-unixfs on dag-pb
...
dag-pb can have HAMT sharded directories which don't at least directly
translate over to IPLD.
2020-06-10 20:32:58 +03:00
Joonas Koivunen
4bdce1d273
add initial version of /cat endpoint
...
this passes 9/13 tests in the interface-ipfs-core.
2020-06-09 12:27:57 +03:00
Joonas Koivunen
d9a273fc9b
refactor: unify StreamResponses
...
these were simply forgotten behind, which lead to responses returning
different headers.
2020-06-09 12:10:55 +03:00
Joonas Koivunen
3f7e25491f
Merge pull request #179 from eqlabs/fix-links
...
Fix links
2020-06-08 15:49:12 +03:00
Joonas Koivunen
fc37f6903f
doc: add why recursion_limit is specified
2020-06-08 15:03:34 +03:00
Joonas Koivunen
c23ad56836
fix: s/ipfs-rust/rs-ipfs
2020-06-08 14:22:03 +03:00
Joonas Koivunen
ad4601a37d
fix: add T: Send bound for Unshared<T>
...
not exactly sure how critical this is, but all of the thinking which was
done for "is this Stream impl ok" was based on the assumption that the
Unshared value was Send, as it was but this was never added as a bound.
2020-04-21 06:55:05 -04:00
Joonas Koivunen
0ee98a4c08
fix: decrease ipfs-http compilation times 50%
...
by boxing the filters on debug builds.
2020-04-18 19:26:29 -04:00