-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lint accept range #535
Lint accept range #535
Conversation
…pecial handling on get handler
Accept range
@ochaton sorry for the mess :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didnt test with Storj yet sadly. But i'll try to squeeze it in today.
@@ -54,11 +53,13 @@ import ( | |||
textTemplate "text/template" | |||
"time" | |||
|
|||
"github.com/dutchcoders/transfer.sh/server/storage" | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets remove this empty line :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, let's have a command for applying this kind of linting :)
"strconv" | ||
"time" | ||
|
||
"regexp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ordering and empty line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go fmt
is reordering imports by default :( maybe you have some configuration for it to get along with the codestyle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i use directly gofmt
: I don't think to have any configuration for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it indeed goimports -w .
but it does not change anything of the above
I've tried five minutes ago: upload was fine, but when I try to open the url jsondecoding of the metadata fails with The donwloaded metadata seems empty or something similar (they are not on the bucket): that's even before than applying the range request when downloading the real file btw: how do I delete the storj account I've created? :) |
Can you check if the file actually exists in the bucket?
Simple support ticket 👍 |
they exists, and the metadata is a proper json: if i print the content from storj.Download i get |
it was because we didn't end in https://github.com/storj/uplink/blob/main/download.go#L60-L62, but rather in https://github.com/storj/uplink/blob/main/download.go#L78-L82, and finally reaching https://github.com/storj/uplink/blob/main/private/stream/download.go#L72 it seems that if you want the full range either you pass good to merge for me, please have a final look, @stefanbenten |
@aspacca maybe we should provide docker-compose.yml or something like that to do integration testing? |
@ochaton I've been thinking for a while about having integration tests: the problem is that only local and s3 storage are possible to test with incurring in actual infra costs for the integration :( |
@aspacca It seems that after refactoring we accidentally removed setting Content-Length header for Range downloads. Caught on my installation during download for large range requests (64Mbytes in the middle of the file). It is enough to add this line: It is missing in upstream now https://github.com/dutchcoders/transfer.sh/blob/main/server/handlers.go#L1206 so now in this line https://github.com/dutchcoders/transfer.sh/blob/main/server/handlers.go#L1236 This works, because, golang server sets Could you patch this place in the upstream? |
I've removed https://github.com/ochaton/transfer.sh/blob/main/server/handlers.go#L1207, because from what I can see we have it already here: https://github.com/ochaton/transfer.sh/blob/main/server/handlers.go#L1257
let's move all the headers before https://github.com/dutchcoders/transfer.sh/blob/main/server/handlers.go#L1236 |
i messed with #527