Skip to content
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

Make "Huge Request Body" workaround automated #314

Open
marcinjahn opened this issue Nov 13, 2024 · 6 comments
Open

Make "Huge Request Body" workaround automated #314

marcinjahn opened this issue Nov 13, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@marcinjahn
Copy link

The page https://kulala.mwco.app/docs/usage/huge-request-body mentions that one has to manually add some annotation to have huge request body working. I think it'd be much more user-friendly if kulala would just use the temp file automatically whenever it's needed.

@gorillamoe gorillamoe added the enhancement New feature or request label Nov 13, 2024
@gorillamoe
Copy link
Member

I also thought about implementing this as the default, but then it would break the "copy as curl" feature somehow.

Still, you'd be able to run the command, but you can't simply use this feature e.g. for sending the curl command to team mates 🤷

@gorillamoe gorillamoe self-assigned this Nov 13, 2024
@marcinjahn
Copy link
Author

Hmm, but what happens right now when you have the “big file” annotation added and then try to copy as curl?

@gorillamoe
Copy link
Member

Hmm, but what happens right now when you have the “big file” annotation added and then try to copy as curl?

copy as curl will copy a command which works only on your local machine, when the big file notation is active.

But that is opt-in and not the default, so for the default requests, the copy as curl copies a handy command which you can simply give to team-mate and it'll simply work.

So let's see how we can implement this in a way that won't break stuff for users :)

@marcinjahn
Copy link
Author

Hmm, but are you able to find out that the temp file thing is necessary prior to sending the request? If so, maybe you could just show a warning notification when copying curl telling users that the curl will only work locally or something.

@gorillamoe
Copy link
Member

Hmm, but are you able to find out that the temp file thing is necessary prior to sending the request? If so, maybe you could just show a warning notification when copying curl telling users that the curl will only work locally or something.

Probably we can, but I need some time for investigation, because it seems to be dependant on the OS and I need a cross-platform way that works for querying the information on how long the arguments string can be.

@Grueslayer
Copy link
Contributor

Grueslayer commented Nov 14, 2024

I don’t think there is a dynamic way to retrieve that info, furthermore it depends how libuv (when using vim.system) handles the arguments / processes on each system (e.g. escaping/quoting). On Linux there were made changes for the complete command line length, the single argument length between builds (2.6.23 vs 2.6.x).
I think there could be only a config variable like max_body_len_for_args which could be set by a guessed value for Unix/Windows and overwritten by the user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants