The import path was added to the go file that included the package
documentation if one existed. Otherwise, I used what seemed to be the
primary file for the package.
Fixes#689
Change-Id: If51be0e86529fd6f179e80af6781e639f8550fd2
Fixes issue #675
Since camput does not seem affected by the above issue, and that camput
(pkg/client really) main difference in how it uploads is that it does
gated requests, it seemed to follow that gating the requests might fix
the problem.
With this change, I don't see the problem anymore either in
TestS3WriteFiles or by manually uploading with the web UI.
I suppose this indicates that S3 throttles incoming connections pretty
strictly, but I have no formal evidence of it.
Change-Id: I48f10923a710f4a21e44bc251e648db37ae504ec
testSubFetcher in blobserver/storagetest was already checking that we'd
get specific error messages in the case of negative input parameters or
an out of range offset.
This change rationalizes these constraints with named errors
(ErrNegativeSubFetch and ErrOutOfRangeOffsetSubFetch) specified
in the SubFetcher interface.
It also fixes the googlestorage and s3 implementations so that they pass
the aforementioned test.
Change-Id: I25b72b842855b90ee3cab44c90654581dccf4b8e
Commit bf8d6bdb (s3: auto-select correct region, handle buckets with
dots in hostname) changed the definition of s3.Client replacing the
second field, which was of type *http.Client, with a field of type
http.RoundTripper. But the test utility function getTestClient() was
not modified accordingly. Fix this to make `go test' in
pkg/misc/amazon/s3 succeed again (without this fix the test fails to
build).
Change-Id: Ida383e2050e215cc2446303c0ce59aa7ab6e7981
Add blobserver.EnumerateAllFrom, make S3 client API match the underlying S3 protocol
with marker instead of after, and then push after->marker conversion logic up
into the s3 enumerate code that's using the S3 client.
Change-Id: I034a7c1c8af441881ebba74bcb523bd690cd16d3
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
More secondary preimage resistance. Also better docs and less vague and less promoted Android
UI.
Feedback from Adam Langley, but likely misinterpreted.
Change-Id: I3bf1029b6fc07c0b8dab2af44926aa87b0d4cbad
Makes the assumption that our old image logic was 'If the image is
huge (>2400px) shrink it to twice the target thumbnail size with
resample (which is quick) then box filter the image in half (which is
slow)'. There was a bug there that was causing large intermediary
images to be allocated when the source image was just the right size
and in portrait orientation (mainly trigger by photos from my Nexus 4).
Generalizes resize code to always resample to 2 times the thumbnail
size and then smooth down. Throws more pixels away faster.
Add downsizing routines that operate inplace. This greatly reduces
our peak memory usage when generating thumbnails.
Add version optimized for our particular resize case (halving);
providing a speed boost over the generalized versions.
Add tests and benchmarks comparing new resize to old.
Test for pkg/misc/resize can be run with --output=output_dir/ to see
the images generated by the old and new resize routines along with
mask of their differences.
Addresses some of the concerns in https://camlistore.org/issue/237
Change-Id: I6464fa637da9db371f15761bb699c045604b6cb8
misc.CountingReader moves into readerutil.
pkg/atomics is folded into pkg/types.
pkg/test/testdep is folded into pkg/test, with better name/docs.
Old cruft from pkg/webserver is deleted.
Change-Id: I3f72d8b29804254ef944995fb085837c878f79f5
This changes allows to always dynamically serve deps.js, generated
either from the local files, or from the embedded resources.
ui.go and publish.go now make use of it.
http://camlistore.org/issue/151
Change-Id: I129895b2c65a0726c1239bdd7387c62e90649a9d
A new client configuration parameter, "trustedCerts" (list of strings)
is introduced. A certificate fingerprint is defined as the 10 digits
prefix of the sha1 of the whole certificate (in ASN1. DER form).
trustedCerts should contain the list of fingerprints of the
certificates we trust. If not empty, the server's certificate
is checked against that list, instead of using the full x509 validation
on it.
-added a dial function and tls configuration, which check if we're using
SSL, and if we're in "trustedCerts" mode.
pkg/client/client.go
pkg/client/config.go
-moved android specific hacks from camput to the client layer, so that
the dial and tls config could reuse/access them. Also allows future
reuse for other commands, such as camget.
pkg/client/android.go
-adapted camput to the above changes:
cmd/camput/android.go
cmd/camput/camput.go
cmd/camput/files.go
-server prints a hint when it generates the self-signed:
pkg/misc/misc.go
server/camlistored/camlistored.go
-camliactivity:
clients/android/res/xml/preferences.xml
clients/android/src/org/camlistore/Preferences.java
clients/android/src/org/camlistore/SettingsActivity.java
clients/android/src/org/camlistore/UploadService.java
clients/android/src/org/camlistore/UploadThread.java
http://camlistore.org/issue/131
Change-Id: I6be20161549a69aafc8eb7b9e96e9351dc1c5b09
A lot is still broken, but most stuff at least compiles now.
The directory tree has been rearranged now too. Go libraries are now
under "pkg". Fully qualified, they are e.g. "camlistore.org/pkg/jsonsign".
The go tool cannot yet fetch from arbitrary domains, but discussion is
happening now on which mechanism to use to allow that.
For now, put the camlistore root under $GOPATH/src. Typically $GOPATH
is $HOME, so Camlistore should be at $HOME/src/camlistore.org.
Then you can:
$ go build ./server/camlistored
... etc
The build.pl script is currently disabled. It'll be resurrected at
some point, but with a very different role (helping create a fake
GOPATH and running the go build command, if things are installed at
the wrong place, and/or running fileembed generators).
Many things are certainly broken.
Many things are disabled. (MySQL, all indexing, etc).
Many things need to be moved into
camlistore.org/third_party/{code.google.com,github.com} and updated
from their r60 to Go 1 versions, where applicable.
The GoMySQL stuff should be updated to use database/sql and the ziutek
library implementing database/sql/driver.
Help wanted.
Change-Id: If71217dc5c8f0e70dbe46e9504ca5131c6eeacde