summaryrefslogtreecommitdiff
path: root/internal/api/fileserver
AgeCommit message (Collapse)AuthorFiles
2023-11-29[bugfix] Correctly handle range > content-length (#2395)Libravatar Jadeiin1
2023-11-27[performance] http response encoding / writing improvements (#2374)Libravatar kim1
2023-11-14[bugfix] process account delete side effects in serial, not in parallel (#2360)Libravatar tobi1
* [bugfix] process account delete side effects in serial, not in parallel * StartWorkers / StartNoopWorkers for tests * undo testrig trace logging * log errors instead of immediately returning
2023-10-23[chore] de-interface{} the federator and dereferencer structs (#2285)Libravatar kim1
* de-interface{} the federator and dereferencer structs * fix broken type signatures
2023-09-23[chore] deinterface the typeutils.Converter and update to use state ↵Libravatar kim1
structure (#2217) * update typeconverter to use state structure * deinterface the typeutils.TypeConverter -> typeutils.Converter * finish copying over old type converter code comments * fix cherry-pick merge issues, fix tests pointing to old typeutils interface type still
2023-08-17[bugfix] fix double firing bun.DB query hooks (#2124)Libravatar kim1
* improve bun.DB wrapping readability + comments, fix double-firing query hooks * fix incorrect code comment placement * fix linter issues * Update internal/db/basic.go * do as the linter commmands ... --------- Signed-off-by: kim <grufwub@gmail.com> Co-authored-by: Daenney <daenney@users.noreply.github.com>
2023-07-13[bugfix] Set Vary header correctly on cache-control (#1988)v0.10.0-rc2Libravatar tobi1
* [bugfix] Set Vary header correctly on cache-control * Prefer activitypub types on AP endpoints * use immutable on file server, vary by range * vary auth on Accept
2023-07-12[bugfix] Properly handle range > content-length (#1979)Libravatar MaeIsBad1
This makes the serveFileRange function return the entire file if suffix-range is larger than content-length in compliance with RFC9110 Co-authored-by: mae <git@badat.dev>
2023-05-28[chore] tidy up media manager, add calling func to errors, build-script ↵Libravatar kim1
improvements (#1835) * media manager tidy-up: de-interface and remove unused PostDataFunc Signed-off-by: kim <grufwub@gmail.com> * remove last traces of media.Manager being an interface Signed-off-by: kim <grufwub@gmail.com> * update error to provide caller, allow tuneable via build tags Signed-off-by: kim <grufwub@gmail.com> * remove kim-specific build script changes Signed-off-by: kim <grufwub@gmail.com> * fix merge conflicts Signed-off-by: kim <grufwub@gmail.com> * update build-script to support externally setting build variables Signed-off-by: kim <grufwub@gmail.com> --------- Signed-off-by: kim <grufwub@gmail.com>
2023-05-25[feature] Add List functionality (#1802)Libravatar tobi1
* start working on lists * further list work * test list db functions nicely * more work on lists * peepoopeepoo * poke * start list timeline func * we're getting there lads * couldn't be me working on stuff... could it? * hook up handlers * fiddling * weeee * woah * screaming, pissing * fix streaming being a whiny baby * lint, small test fix, swagger * tidying up, testing * fucked! by the linter * move timelines to state like a boss * add timeline start to tests using state * invalidate lists
2023-03-12[chore] Improve copyright header handling (#1608)Libravatar Daenney4
* [chore] Remove years from all license headers Years or year ranges aren't required in license headers. Many projects have removed them in recent years and it avoids a bit of yearly toil. In many cases our copyright claim was also a bit dodgy since we added the 2021-2023 header to files created after 2021 but you can't claim copyright into the past that way. * [chore] Add license header check This ensures a license header is always added to any new file. This avoids maintainers/reviewers needing to remember to check for and ask for it in case a contribution doesn't include it. * [chore] Add missing license headers * [chore] Further updates to license header * Use the more common // indentend comment format * Remove the hack we had for the linter now that we use the // format * Add SPDX license identifier
2023-03-01[chore] move client/federator workerpools to Workers{} (#1575)Libravatar kim1
* replace concurrency worker pools with base models in State.Workers, update code and tests accordingly * improve code comment * change back testrig default log level * un-comment-out TestAnnounceTwice() and fix --------- Signed-off-by: kim <grufwub@gmail.com> Reviewed-by: tobi
2023-02-22[chore] Deinterface processor and subprocessors (#1501)Libravatar tobi3
* [chore] Deinterface processor and subprocessors * expose subprocessors via function calls * missing license header
2023-02-17[feature] Add a request ID and include it in logs (#1476)Libravatar Daenney2
This adds a lightweight form of tracing to GTS. Each incoming request is assigned a Request ID which we then pass on and log in all our log lines. Any function that gets called downstream from an HTTP handler should now emit a requestID=value pair whenever it logs something. Co-authored-by: kim <grufwub@gmail.com>
2023-02-16[bugfix] Set cache-control max-age dynamically for s3 (#1510)Libravatar tobi1
* [bugfix] set cache-control max-age dynamically for s3 * woops * double whoops * time until, thank you linter, bless you, you're the best, no matter what kim says * aa
2023-02-13[chore] Do cache-control in a less silly way to avoid writing header twice ↵Libravatar tobi1
(#1481) * do cache-control in a less silly way to avoid writing header twice * add comment back in
2023-02-12[bugfix] Set appropriate cache-control when using presigned s3 links (#1480)Libravatar tobi1
2023-02-07[bugfix] fix file range length calculation being off by 1 (#1448)Libravatar kim1
* small formatting change * fix range handling new length calculation --------- Signed-off-by: kim <grufwub@gmail.com>
2023-02-06[performance] remove local copying of file for satisfying range headers (#1421)v0.7.0-rc1Libravatar kim1
* remove local copying of file for satisfying range headers Signed-off-by: kim <grufwub@gmail.com> * remove unused import Signed-off-by: kim <grufwub@gmail.com> * fix range header reader limit calculation Signed-off-by: kim <grufwub@gmail.com> --------- Signed-off-by: kim <grufwub@gmail.com>
2023-02-02[feature] Implement `/api/v2/instance` endpoint (#1409)Libravatar tobi1
* interim: start adding /api/v2/instance * finish up
2023-01-16[bugfix] Parse video metadata more accurately; allow Range in fileserver (#1342)Libravatar tobi1
* don't serve unused fields for video attachments * parse video bitrate + duration more accurately * use ServeContent where appropriate to respect Range * abstract temp file seeker into its own function
2023-01-11[performance] media processing improvements (#1288)Libravatar kim2
* media processor consolidation and reformatting, reduce amount of required syscalls Signed-off-by: kim <grufwub@gmail.com> * update go-store library, stream jpeg/png encoding + use buffer pools, improved media processing AlreadyExists error handling Signed-off-by: kim <grufwub@gmail.com> * fix duration not being set, fix mp4 test expecting error Signed-off-by: kim <grufwub@gmail.com> * fix test expecting media files with different extension Signed-off-by: kim <grufwub@gmail.com> * remove unused code Signed-off-by: kim <grufwub@gmail.com> * fix expected storage paths in tests, update expected test thumbnails Signed-off-by: kim <grufwub@gmail.com> * remove dead code Signed-off-by: kim <grufwub@gmail.com> * fix cached presigned s3 url fetching Signed-off-by: kim <grufwub@gmail.com> * fix tests Signed-off-by: kim <grufwub@gmail.com> * fix test models Signed-off-by: kim <grufwub@gmail.com> * update media processing to use sync.Once{} for concurrency protection Signed-off-by: kim <grufwub@gmail.com> * shutup linter Signed-off-by: kim <grufwub@gmail.com> * fix passing in KVStore GetStream() as stream to PutStream() Signed-off-by: kim <grufwub@gmail.com> * fix unlocks of storage keys Signed-off-by: kim <grufwub@gmail.com> * whoops, return the error... Signed-off-by: kim <grufwub@gmail.com> * pour one out for tobi's code <3 Signed-off-by: kim <grufwub@gmail.com> * add back the byte slurping code Signed-off-by: kim <grufwub@gmail.com> * check for both ErrUnexpectedEOF and EOF Signed-off-by: kim <grufwub@gmail.com> * add back links to file format header information Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
2023-01-05[chore] Update/add license headers for 2023 (#1304)Libravatar tobi4
2023-01-02[chore] The Big Middleware and API Refactor (tm) (#1250)Libravatar tobi4
* interim commit: start refactoring middlewares into package under router * another interim commit, this is becoming a big job * another fucking massive interim commit * refactor bookmarks to new style * ambassador, wiz zeze commits you are spoiling uz * she compiles, we're getting there * we're just normal men; we're just innocent men * apiutil * whoopsie * i'm glad noone reads commit msgs haha :blob_sweat: * use that weirdo go-bytesize library for maxMultipartMemory * fix media module paths