mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2026-02-03 14:13:26 +00:00
No x-url-delete header when sending POST request
#151
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @anihm136 on GitHub.
I noticed that the
x-url-deleteheader is not being set when the user uploads a file via post request. Is uploading files via POST deprecated? (since all the examples seem to use PUT requests instead). If not, I think the header should be set correctly@paolafrancesca commented on GitHub:
@anihm136 , yes,
x-url-deleteis not supported onPOST.Rather than merging the
POSTandPUThandler, I would remove thePOSTone, or add thex-url-deleteheader@paolafrancesca commented on GitHub:
@anihm136
I kept updating the
POSThandler but for thex-url-delete, on the other side there's basically no documentation about it and all the scripts/examples refer only to thePUThandler.I would have no regret in removing, I just wonder how many people use it and will miss it
@anihm136 commented on GitHub:
Is
POSTmeant to be officially supported? If not, I could remove the post-related handlers and logic, else I can add the header@anihm136 commented on GitHub:
Well, I recently started contributing some features to one of the unofficial python clients, which uses the
POSTmethod (which is how I ran into this in the first place). Considering there is not much documentation on it, if any, I doubt many users would be using it. For the ones that are, you could share a deprecation notice in some form, and remove it in some time. The only advantage of the post handler that I see is that it takes the name of the uploaded file automatically, but there is lots of documentation on how to get the same experience with thePUTrequest as well, so I feel overall it will just be one thing less to maintain@anihm136 commented on GitHub:
If this is indeed an omission, I would propose to merge the handlers for the POST and PUT requests. Instead, handling filename resolution can be separated into different functions based on the request method, since that seems to be the only difference between the two functions
@paolafrancesca commented on GitHub:
@anihm136 I honeslty don't have much visibility on the clients, I think that listing them on this repo could be valuable as well. could you help on that?
as for the
POSThandler, happy to remove indeed: but not before auditing as much as possible the clients around and how many of them rely on it.in the meanwhile you're welcome to add the
x-url-deleteheaders to thePOSThandler@anihm136 commented on GitHub:
I agree that it would be useful to list other clients here. I only know of a couple so far, but I'd be happy to help find and list more of them. In the meantime I'll add the headers to the post handler
@paolafrancesca commented on GitHub:
@anihm136 great, thanks. looking forward for the PR
@anihm136 commented on GitHub:
I have created a PR for adding the headers. Let me know how you'd like to begin work on listing existing clients (new issue, GH discussion or any other), and I can start listing some of the ones I've come across
@paolafrancesca commented on GitHub:
thanks, see my comment
either an issue or a GH discussion is fine for me