Commit Graph

222 Commits

Author SHA1 Message Date
Felix Geisendörfer 11343caaae Implement test setup and teardown
Will be reused for the core tests
2013-05-07 11:05:20 +02:00
Felix Geisendörfer 6adf639d37 Write some functional handler tests
Also found / fixes a few issues thanks to this!
2013-05-07 10:52:03 +02:00
Felix Geisendörfer d490f50d45 Comments and fixed status code 2013-05-06 15:08:34 +02:00
Felix Geisendörfer 8b1a251f6f Final-Length header 2013-05-03 13:02:24 +02:00
Felix Geisendörfer 18cffb2b03 Return url for new file resources 2013-05-03 12:52:25 +02:00
Felix Geisendörfer 3abd71b6c0 error handling, url matching 2013-05-03 11:42:46 +02:00
Felix Geisendörfer 0e87800ddc Initial refactoring, WIP 2013-05-02 18:29:42 +02:00
Felix Geisendörfer be8535b206 Explain dev.sh 2013-05-02 15:28:22 +02:00
Felix Geisendörfer f25c3c71ae New skeleton 2013-05-02 15:25:02 +02:00
Felix Geisendörfer 36cda94bb6 gofmt 2013-05-02 14:52:25 +02:00
Felix Geisendörfer 02d0491249 Update readme info for tusd 2013-05-02 14:48:25 +02:00
Felix Geisendörfer 50dae8f4f6 Add reply logging 2013-05-02 14:48:24 +02:00
Kevin van Zonneveld b449132ba4 Point to MIT License 2013-04-16 13:26:29 +03:00
Kevin van Zonneveld 2d8cd0345b Add MIT License 2013-04-16 13:25:45 +03:00
Felix Geisendörfer 66d28e97bb Full urls for Location header 2013-04-07 17:20:38 +02:00
Felix Geisendörfer 0af9ef3827 Consistent Case 2013-04-07 10:18:07 +02:00
Kevin van Zonneveld 5945dc06d9 Disable the partial get as it wasn't supported by the protocol
it used to be, but not intentionally. now results in a
CopyN of size %!s(int64=26) failed with: EOF
(it tries to copy the full range),
so disabling
2013-03-29 22:57:48 +01:00
Kevin van Zonneveld c94edc0092 Implement more of the planned 404s 2013-03-29 22:55:07 +01:00
Kevin van Zonneveld 15c3a6f898 Improve error message when downloading an incomplete file 2013-03-29 22:51:08 +01:00
Felix Geisendörfer 817129c2a5 Revert "Turn every @todo 404 into an actual 404"
This reverts commit 7601e3a77e.
2013-03-28 15:20:47 +01:00
Kevin van Zonneveld 7601e3a77e Turn every @todo 404 into an actual 404 2013-03-27 22:30:48 +01:00
tim-kos b8f27ed6bc make datastore_dir and datastore_max_size configurable env vars, fixes #2 2013-03-27 07:16:23 +01:00
Felix Geisendörfer 802051a06c Update Readme 2013-03-26 15:45:20 +01:00
Felix Geisendörfer e378965e21 Implement DataStore garbage collector
Closes #6
2013-03-25 14:41:21 +01:00
Felix Geisendörfer 79db40bf51 Support Content-Disposition 2013-03-25 11:02:47 +01:00
Felix Geisendörfer 145af6dbfb Remove some debug stuff 2013-03-25 10:47:01 +01:00
Felix Geisendörfer 1e9c701aca Fix: Upload broken
Fixes #7
2013-03-25 10:27:31 +01:00
Felix Geisendörfer c8ab86ee3e Log partial file writes 2013-03-23 12:42:49 +01:00
Felix Geisendörfer 0f4b92b01d Use TUSD_PORT 2013-03-23 12:13:29 +01:00
Felix Geisendörfer 96b92970dd Return 404 if file does not exist 2013-03-21 14:17:07 +01:00
Felix Geisendörfer 0e217d86d9 Work around Go bug 2013-03-21 14:15:29 +01:00
Felix Geisendörfer e17edd2f71 Store file size in meta info, avoid Truncate()
Gives radically performance improvements for initial POST request.
2013-03-21 13:16:17 +01:00
Felix Geisendörfer e652e3f237 Add comment 2013-03-21 13:02:35 +01:00
Felix Geisendörfer 327ee2bbe0 Fix CORS 2013-03-21 13:00:03 +01:00
Felix Geisendörfer 9df1b91d68 Change license 2013-03-20 22:00:04 +01:00
Felix Geisendörfer 230e8425ab Comment on route change
cc @kvz
2013-03-20 21:56:33 +01:00
Kevin van Zonneveld f67ce78c4d Bash script now correctly puts 2 parts.
So what triggered the previous error was an invalid range. What
remains weird is why a failed PUT would still be retrievable
2013-03-20 17:53:45 +01:00
Kevin van Zonneveld d4718fc6f0 Whitespace and small fixes 2013-03-20 17:53:09 +01:00
Kevin van Zonneveld e68f74faa0 put fails, but it looks like full data is still available.
The second PUT fails, the HEAD also claims to only have 3 bytes,
that would be inline with the fail. However the final get is able
to return the full 6 bytes. 3 of which are stored by the 2nd PUT that
was reported to fail.
2013-03-20 16:51:06 +01:00
Kevin van Zonneveld 06c230a0c2 Fix issue where you'd get hanging connections, passing a \r into fileIds.
Working with bash it's easier to get a \r in your ids, than not.
Even more so, it's hard to debug when it happens and hangs your HEAD
request.

To reproduce:
git pull
git checkout 6ac7656bec
go run src/cmd/tusd/*.go
./scripts/demo-alphabet.sh
2013-03-20 16:28:40 +01:00
Kevin van Zonneveld 6ac7656bec Demo script. Without a `tr -d '\r'`, this will currently hang the HEAD indefinitely 2013-03-20 16:19:31 +01:00
Kevin van Zonneveld 8f45ae8bde Copy-pastable install instructions 2013-03-20 14:02:24 +01:00
tim-kos 529614515a add support for POST requests that do not provide a content-range header 2013-03-19 16:55:35 +01:00
tim-kos 83d367fd11 add more headers, routes and also allow POSTING to /files/<id> to add compatibility with jQuery File Upload 2013-03-19 16:36:48 +01:00
tim-kos dab46b60c9 conflict fix 2013-03-19 11:07:26 +01:00
tim-kos 08745ff59a conflict fix 2013-03-19 11:06:46 +01:00
Felix Geisendörfer 7aa733c7de Docs 2013-03-19 11:02:02 +01:00
Felix Geisendörfer e8d2364048 New json based log format, stores content-type 2013-03-19 10:58:18 +01:00
Felix Geisendörfer 99b15cf7af Finish DataStore 2013-03-19 10:36:08 +01:00
Felix Geisendörfer 02b0a3b697 Remove old data code 2013-03-19 10:33:31 +01:00