Commit Graph

1347 Commits

Author SHA1 Message Date
Brad Fitzpatrick 4afc5d32f0 diskpacked: don't append duplicate blobs.
Change-Id: I3adce39641458a67a3cdee09bb66411dd1111acd
2014-02-07 10:46:35 -08:00
Brad Fitzpatrick 9a9da7196b localdisk: add IsDir
Change-Id: I98748d6cb8ff650e0369ef0518eeeefce73f0354
2014-02-07 10:45:43 -08:00
Brad Fitzpatrick 254239c379 diskpacked: add IsDir and New
Change-Id: Iba7bfa4772c494240104f4f67e4a1a946f64b6c8
2014-02-07 10:45:22 -08:00
Brad Fitzpatrick 1fcb446d38 dir: add new blobserver/dir package to do localdisk or diskpacked
Change-Id: I27a2d6b7a00e34490b9da264280c5b10f81c30ec
2014-02-07 09:50:59 -08:00
Brad Fitzpatrick 78c50e8151 test: add World.NewPermanode
Change-Id: I737ae2f69b567eaebf13a3f7c786e06b791e2f7c
2014-02-04 18:49:15 -08:00
Brad Fitzpatrick c179081ab7 httputil: add IsWebsocketUpgrade, fix BadRequestError inconsistency
Change-Id: I85e34fe4e87c2402fe6ab002bcd374ef0fd41141
2014-02-03 20:24:45 -05:00
Brad Fitzpatrick 1046470614 Rename ResponseWriter 'conn' to 'rw'
Change-Id: Id0faeac080f678794c1db1601cb9c1a9ba92e926
2014-02-03 20:23:39 -05:00
Brad Fitzpatrick 433a312703 fs: fix bug picking recent filenames when file has no name
e.g. iphone uploads

Change-Id: Ieee398b6f43c261232bc9f6cc0c71cb97c5c49f8
2014-02-02 06:14:44 +01:00
Brad Fitzpatrick ba3df9f44c cacher: don't nuke everything on close for now
Change-Id: Ifd210c06b70c411efc7f33daba39c5f105185514
2014-01-31 12:53:10 +01:00
Brad Fitzpatrick 3e0d6521b8 Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2014-01-31 12:27:18 +01:00
Brad Fitzpatrick ef1063828b osutil: add DirExists
Change-Id: I3c15cd0bedeffea6d62dffc8603e4e71e57e52af
2014-01-31 12:20:24 +01:00
Brad Fitzpatrick e5ad2282c4 fs: cache recent dir for a bit
Change-Id: Id85344038d38dedc134435463d96d8b836edbcd7
2014-01-31 11:50:22 +01:00
Dustin Sallings fff8db88a7 fs: tests for xattr operations
Change-Id: I0501a8ec69fb30df7104b105f8e07a1864d2b5f6
2014-01-30 17:57:32 -08:00
Brad Fitzpatrick 3f27e4f708 Add android camput pre-exit hook.
Change-Id: I30f9771e5562ece6a35d44cc8ab57c305a2899cb
2014-01-30 17:29:28 +01:00
Brad Fitzpatrick 8bc393e978 client/android: track connection closes too
Change-Id: I08b3ddec817fb27e0d52841168492ba510087bf3
2014-01-30 17:19:30 +01:00
Brad Fitzpatrick 2fde1c3632 httputil: make CloseBody more robust
Change-Id: If46c60a5088f57ada45b8aa91ae29c8f512604c7
2014-01-29 11:31:52 +01:00
Brad Fitzpatrick 7c3afd2711 httputil: add test for CloseBody
Change-Id: I6049de69279aef7bb0c013935ae4d37b8eaff853
2014-01-28 23:14:02 -08:00
Brad Fitzpatrick eb27581da7 httputil: add DecodeJSON and CloseBody helpers, then use them everywhere
httputil.CloseBody closes a http.Response.Body nicely, such that it's
more likely to be re-used.

httputil.DecodeJSON parses JSON from a Response.Body and closes the
body. It also keeps a temporary copy of the input, for error messages.

Then use them everywhere, to improve HTTP TCP connection re-use.

And misc other clean-ups.

Change-Id: I5dc44be0165b13659459ed29ce5ab44c17d9739f
2014-01-28 22:00:52 -08:00
Brad Fitzpatrick 2a3d84824a jsonsign: update old code to use fmt.Errorf
Change-Id: Iedd969e336dd02af6b3bc60590bfc7aa9ea9c89e
2014-01-28 21:52:36 -08:00
Brad Fitzpatrick 0052ec2366 webserver: also log req.RemoteAddr in verbose mode
Change-Id: I83e2ddcb74208de61d5392a519b69d147f427c1d
2014-01-28 12:31:20 -08:00
Dustin Sallings 6f5b0151f2 client: don't remember discovery errors permanently
fixes camlistore.org/issue/348

Change-Id: I689319cd03dbbcc035698a2ce58d4557c28d9ac0
2014-01-27 16:45:18 -08:00
Brad Fitzpatrick a70b554023 pkg/client, camput: don't stat each chunk before uploading
Trust the have cache for skipping uploads.

Reduces total number of HTTP requests.

Also, set Transport's MaxIdleConnsPerHost to be the same as
our HTTP concurrency level, to not keep re-creating TCP
connections.
2014-01-27 16:07:15 -08:00
Brad Fitzpatrick 798cd5e9d2 client: use syncutil.Gate instead doing it by hand 2014-01-27 14:08:05 -08:00
Brad Fitzpatrick 3d3e702a16 Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2014-01-26 22:05:16 -08:00
Brad Fitzpatrick 0072a5b325 client/android: instrument memory usage.
also try to GC and return memory to OS every 5 seconds, but
that barely makes a dent in the real problem.

more later.

Change-Id: I2979e099121bdcb8578124b1c45714313cc2ec09
2014-01-26 22:05:02 -08:00
Brad Fitzpatrick f4d9fab966 schema: don't use ReceiveBlob directly
Change-Id: I268165cdaa4e4c8fea720a57a58cccc0f934cdf2
2014-01-26 21:56:39 -08:00
Brad Fitzpatrick c97c0d48b3 osutil: add MemUsage func
Change-Id: I4a0cbde782077c5b34caefd9b6bdb99bc659c2c9
2014-01-26 21:56:16 -08:00
Brad Fitzpatrick b15cde9bce Merge "pkg/search: Add durationms to MediaTagConstraint comment." 2014-01-26 18:45:33 +00:00
Daniel Erat ef6e0bc696 pkg/search: Add durationms to MediaTagConstraint comment.
Change-Id: I8c097c2c88afaf01b9eb0f62072f5e68bddf5ca0
2014-01-25 17:22:33 -08:00
Brad Fitzpatrick 1442639257 Merge "Added syncutil.Once" 2014-01-25 22:05:56 +00:00
Dustin Sallings 4fb88a2120 Added syncutil.Once
Change-Id: I83744a3646bac449934ab0dc6477b4dd1c351e5e
2014-01-25 12:04:47 -08:00
Brad Fitzpatrick de99ea69cd Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2014-01-25 11:04:12 -08:00
Brad Fitzpatrick 92b23e391d search: basic lexer to supported quoted tokens in search expressions
Change-Id: I6c8c37e3b27ab947623bbe7431352a14aa029839
2014-01-25 11:04:02 -08:00
Brad Fitzpatrick 80f6c39c20 Merge "pkg/index: Index audio duration." 2014-01-25 18:42:09 +00:00
Daniel Erat 5603ea8e0d pkg/index: Index audio duration.
Add pkg/media with code to calculate MPEG audio duration.
Index it in a "durationms" property.

Change-Id: Ifb6251657cadc365ef3f5667a0512fde17575560
2014-01-25 10:40:06 -08:00
Brad Fitzpatrick 74479632a2 Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2014-01-25 09:27:00 -08:00
Brad Fitzpatrick 466f166817 geocode: if Google returns a whole-world geometry, use its viewport instead
Change-Id: Iec4abf2ad117ab37a3f23fedc12e6e7b3943fc4e
2014-01-25 09:26:18 -08:00
Tommi Virtanen 6cda29582b third_party: Switch FUSE library to bazil.org/fuse
import bazil.org/fuse at f6649cd46fb76b1e04ba9eeffb773cb189278d31
remove code.google.com/p/rsc/fuse.

Huge thanks to Tommi Virtanen for the fuse support.

Change-Id: I44b95ac1ea344648593c7376f83ca675a56077b3
2014-01-24 13:28:08 -08:00
mpl a629124f44 Merge "pkg/types: add InvertedBool" 2014-01-23 21:58:12 +00:00
mpl 20b9f5d6f1 pkg/types: add InvertedBool
Will be needed for json tagged serverconfig in subsequent commit.

http://camlistore.org/issue/339

Change-Id: I41ae6e9918b23eb9bdb471e402de0415f3499dc3
2014-01-23 22:54:18 +01:00
mpl 1373456c25 Merge "rename pkg/serverconfig to pkg/serverinit" 2014-01-23 21:25:26 +00:00
Tamás Gulácsi 9feb32a329 Add some common file signatures to magic.
Change-Id: I428933fdb5bb987113ae1bbd1161eca4c477b426
2014-01-23 21:55:37 +01:00
Brad Fitzpatrick c35f1d1afe Merge "pkg/index: Index more music-related properties." 2014-01-23 16:33:08 +00:00
mpl 448f266d72 rename pkg/serverconfig to pkg/serverinit
To avoid awkwardness with future pkg/types/serverconfig

http://camlistore.org/issue/339

Change-Id: If8a00941cdc269d6bcfe0f76c596154d5969bf0d
2014-01-23 17:18:46 +01:00
Daniel Erat 404548d31a pkg/index: Index more music-related properties.
Add disc and mediaref (a hash of the audio portion of the
file).

Also relocate taglib code to
third_party/github.com/hjfreyer/taglib-go.

Change-Id: I58364f525b787484af894663125163095256d7c6
2014-01-22 21:25:05 -08:00
Brad Fitzpatrick 1b7ac2da01 test: add TODO to simplify 2014-01-21 14:18:11 -08:00
Daniel Erat 704d3c6bfc pkg/index: Rename audiotag to mediatag.
Also fix up keys and values and add tests.

Change-Id: I7e6c5c4315705442e3517456f2ba16419af49f2f
2014-01-20 21:46:39 -08:00
Brad Fitzpatrick 5b03c3f8fb search, index: let media tags be searchable too.
git push from Dolores Park. Sorry, no tests. Dan Erat will tell me if
this doesn't work.

Change-Id: I557cc3d07983390b8a15b7756ee0825fced2f503
2014-01-20 15:47:36 -08:00
Brad Fitzpatrick 9abba638a0 Add new environment variables for setting client identity for use with test.World.
Testing clients should now use CAMLI_CLIENT_IDENTITY,
CAMLI_DISABLE_CLIENT_CONFIG_FILE (both new) and existing
CAMLI_SECRET_RING, set using the new test.World accessors.

Change-Id: I9fc0571b008f033674466bbc98129ae1919a0640
2014-01-20 13:54:42 -08:00
Brad Fitzpatrick a384ff188d Get rid of CAMLI_DEV_KEYBLOBS / keyblobs / etc.
Fixes camlistore.org/issue/277

Change-Id: I7f380f9d18785f600fa0c442d5a19cd118782788
2014-01-20 13:47:08 -08:00