Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | mod_http_file_share: Update comment about x-frame-options | Kim Alvefur | 2021-06-20 | 1 | -1/+1 |
| | | | | | | | | | X-Frame-Options was replaced by the Content-Security-Policy 'frame-ancestors' directive, but Internet Explorer does not support that part of CSP. Since it's just one line it doesn't hurt to keep until some future spring cleaning event :) | ||||
* | mod_http_file_share: Build list of measuring buckets for configured size limit | Kim Alvefur | 2021-06-08 | 1 | -1/+7 |
| | | | | | Creates buckets up to the configured size limit or 1TB, whichever is smaller, e.g. {1K, 4K, 16K, ... 4M, 16M} | ||||
* | mod_http_file_share: Handle out of bounds Range request | Kim Alvefur | 2021-05-17 | 1 | -3/+8 |
| | | | | | | | Turns out you can seek past the end of the file without getting an error. Also rejects empty range instead of sending the whole file. | ||||
* | mod_http_file_share: Support download resumption via Range requests | Kim Alvefur | 2021-05-16 | 1 | -0/+20 |
| | | | | | | | | Only a starting point is supported due to the way response:send_file() sends everything it gets from the provided file handle but does not have any way to specify how much to read. This matches what Conversations appears to be doing. | ||||
* | mod_http_file_share: Include expiry time of the upload itself in token | Kim Alvefur | 2021-04-05 | 1 | -0/+1 |
| | | | | | | Lets an external upload service know this so it can do expiry itself. Could possibly have been calculated based on the token expiry or issuance time, explicit > implicit. | ||||
* | mod_http_file_share: Include time of issuance in auth token | Kim Alvefur | 2021-04-05 | 1 | -1/+3 |
| | | | | | In case an external upload service wants to have the original creation time, or calculate the token expiry itself. | ||||
* | mod_http_file_share: Group related properties for readability | Kim Alvefur | 2021-04-05 | 1 | -2/+6 |
| | |||||
* | mod_http_file_share: Log error opening file for writing | Kim Alvefur | 2021-04-05 | 1 | -2/+3 |
| | | | | util.error.coerce() doesn't work well with iolib | ||||
* | mod_http_file_share: Fix logging of error opening file | Kim Alvefur | 2021-04-05 | 1 | -1/+1 |
| | | | | It's annoying that Lua interpolates the filename into the error message. | ||||
* | mod_http_file_share: Include storage in prune time measurement | Kim Alvefur | 2021-03-31 | 1 | -1/+1 |
| | | | | Maybe the original idea was that you would measure storage separately? | ||||
* | mod_http_file_share: Add internal command to check files consistency | Kim Alvefur | 2021-03-28 | 1 | -0/+18 |
| | | | | | | Background: Found a few files in my store that did not match the size recorded in the slot, so I needed a way to check which which those were. As it was a bit too much to type into the shell I added it here instead. | ||||
* | mod_http_file_share: Fix reporting of missing files | Kim Alvefur | 2021-03-28 | 1 | -2/+5 |
| | | | | | | | This just gave an unhelpful 500 error. It would be nice to have some wrapper code that could untangle the embedded filename in the io libs errors. | ||||
* | mod_http_file_share: Report number of items in caches to statsmanager | Kim Alvefur | 2021-03-28 | 1 | -0/+8 |
| | | | | | | This is neat, O(1) reporting, why don't we do this everywhere? Gives you an idea of how much stuff is in the caches, which may help inform decisions on whether the size is appropriate. | ||||
* | mod_http_file_share: Skip removal of nothing | Kim Alvefur | 2021-02-26 | 1 | -5/+9 |
| | | | | | In case none of the expired files could be deleted then it's a waste of an API call to try to remove any of the metadata at all. | ||||
* | mod_http_file_share: Remove correct entries when not all expired files were ↵ | Kim Alvefur | 2021-02-25 | 1 | -10/+20 |
| | | | | | | | | | | | | | | | | | | | | | | | deleted If any of the expired files could not be deleted then we should not forget about that, we should complain loudly and try again. The code got this backwards and would have removed only the entries referring to still existing files. Test procedure: 1. Upload a file 2. chown root:root http_file_share/ 3. In uploads.list, decrease 'when' enough to ensure expiry 4. Reload mod_http_file_share 5. Should see an error in the logs about failure to delete the file 6. Should see that the metadata in uploads.list is still there 7. chown http_file_share/ back to the previous owner 8. Reload mod_http_file_share 9. Should see logs about successful removal of expired file 10. Should see that the metadata in uploads.list is gone 11. Should see that the file was deleted | ||||
* | mod_http_file_share: Fix traceback on missing file-type | Kim Alvefur | 2021-02-24 | 1 | -1/+4 |
| | | | | attempt to index a nil value (local 'filetype') casued by the :gsub call | ||||
* | mod_http_file_share: Allow credentials via CORS (needed for auth token) | Kim Alvefur | 2021-02-23 | 1 | -0/+3 |
| | |||||
* | mod_http_file_share: Return a message from the base URL | Kim Alvefur | 2021-02-21 | 1 | -0/+9 |
| | |||||
* | mod_http_file_share: Prevent attempt to upload again after completion | Kim Alvefur | 2021-02-13 | 1 | -0/+9 |
| | |||||
* | mod_http_file_share: Support sending 100 Continue | Kim Alvefur | 2021-02-13 | 1 | -0/+3 |
| | | | | | E.g. curl will ask for this when sending large uploads. Removes a delay while it waits for an error or go-agead. | ||||
* | mod_http_file_share: Collect cache hit/miss statistics for downloads | Kim Alvefur | 2021-02-02 | 1 | -1/+5 |
| | |||||
* | mod_http_file_share: Measure how long it takes to prune expired files | Kim Alvefur | 2021-02-02 | 1 | -0/+3 |
| | |||||
* | mod_http_file_share: Collect statistics of files uploaded | Kim Alvefur | 2021-02-02 | 1 | -0/+3 |
| | |||||
* | mod_http_file_share: Reorder arguments | Kim Alvefur | 2021-01-31 | 1 | -2/+2 |
| | | | | | 'filetype' is optional, so having it last seems sensible. 'slot' is pretty important, so moving it earlier seems sensible. | ||||
* | mod_http_file_share: Update cached value while it is reasonably fresh | Kim Alvefur | 2021-01-31 | 1 | -5/+10 |
| | | | | | This should ensure that cache entries until the oldest file that counted to the last 24h becomes older than 24h. | ||||
* | mod_http_file_share: Cache quotas to avoid hitting storage | Kim Alvefur | 2021-01-31 | 1 | -2/+12 |
| | |||||
* | mod_http_file_share: Split out some variables for later reuse | Kim Alvefur | 2021-01-31 | 1 | -1/+3 |
| | |||||
* | mod_http_file_share: Add support for daily upload quotas. | Kim Alvefur | 2021-01-31 | 1 | -0/+19 |
| | | | | | Daily instead of total quotas, should be more efficient to calculate. Still O(n), but a smaller n. Less affected by total retention period. | ||||
* | mod_http_file_share: Add missing semicolon | Kim Alvefur | 2021-01-31 | 1 | -1/+1 |
| | | | | | Last comma or semicolon isn't required but makes the diffs nicer once you add another item after it. | ||||
* | mod_http_file_share: Clarify log message | Kim Alvefur | 2021-01-30 | 1 | -1/+1 |
| | | | | | No expired ... what? Could be inferred from the module logging it, but better to be explicit. | ||||
* | mod_http_file_share: Indicate missing token via WWW-Authenticate header | Kim Alvefur | 2021-01-29 | 1 | -0/+1 |
| | |||||
* | mod_http_file_share: Clarify message about missing Authorization header | Kim Alvefur | 2021-01-29 | 1 | -1/+1 |
| | |||||
* | mod_http_file_share: Allow started uploads to complete after token expired | Kim Alvefur | 2021-01-28 | 1 | -1/+1 |
| | | | | | | | Otherwise uploads taking longer than 5 minutes would be rejected on completion, and that's probably annoying. Thanks jonas’ | ||||
* | mod_http_file_share: Serve configurable set of safe mime types inline ↵ | Kim Alvefur | 2021-01-28 | 1 | -1/+8 |
| | | | | | | (thanks jonas’) Otherwise people complain about browser 'Save as' dialog. | ||||
* | mod_http_file_share: Cache file metadata | Kim Alvefur | 2021-01-28 | 1 | -9/+38 |
| | | | | | | | | For faster access by avoiding archive ID. No benchmarks were harmed in the making of this commit. ... no benchmarks were performed at all. | ||||
* | mod_http_file_share: Extract all file properties into variables earlier | Kim Alvefur | 2021-01-28 | 1 | -4/+12 |
| | | | | | A step towards adding caching, which will unpack into the same variables. | ||||
* | mod_http_file_share: Fix the obligatory misplaced closing bracket (thanks ↵ | Kim Alvefur | 2021-01-27 | 1 | -1/+1 |
| | | | | scansion) | ||||
* | mod_http_file_share: Insert pauses to avoid blocknig for long periods | Kim Alvefur | 2021-01-27 | 1 | -0/+8 |
| | | | | Similar to the mod_mam cleanup job | ||||
* | mod_http_file_share: Add support for removing old files (default 2 weeks) | Kim Alvefur | 2021-01-27 | 1 | -1/+59 |
| | |||||
* | mod_http_file_share: More security headers | Kim Alvefur | 2021-01-27 | 1 | -2/+4 |
| | |||||
* | mod_http_file_share: Strip authorization type prefix a bit earlier | Kim Alvefur | 2021-01-27 | 1 | -2/+5 |
| | |||||
* | mod_http_file_share: Factor out function for generating full filename | Kim Alvefur | 2021-01-27 | 1 | -2/+6 |
| | |||||
* | mod_http_file_share: Use '.bin' file extension | Kim Alvefur | 2021-01-27 | 1 | -2/+3 |
| | | | | | Distinct from '.dat' used by datamanager / internal stortage for Lua object storage so that they can't easily be loaded by accident that way. | ||||
* | mod_http_file_share: Validate file size early in HTTP PUT request | Kim Alvefur | 2021-01-27 | 1 | -0/+5 |
| | |||||
* | mod_http_file_share: Move Authorization type string | Kim Alvefur | 2021-01-27 | 1 | -2/+2 |
| | | | | It belongs with the header more than the token itself | ||||
* | mod_http_file_share: Add some logging | Kim Alvefur | 2021-01-27 | 1 | -0/+14 |
| | |||||
* | mod_http_file_share: Handle content-type being optional | Kim Alvefur | 2021-01-27 | 1 | -2/+2 |
| | |||||
* | mod_http_file_share: Reject invalid file sizes | Kim Alvefur | 2021-01-27 | 1 | -0/+4 |
| | |||||
* | mod_http_file_share: Fix name of max-file-size tag | Kim Alvefur | 2021-01-27 | 1 | -1/+1 |
| | |||||
* | mod_http_file_share: Expand registry to fix extra tag | Kim Alvefur | 2021-01-27 | 1 | -5/+6 |
| | | | | | Error registry compact format doesn't support extra.tag so needs to be the more verbose format |