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

Cannot use setHTML with larger texts #20

Open
pr4xx opened this issue Sep 26, 2020 · 2 comments
Open

Cannot use setHTML with larger texts #20

pr4xx opened this issue Sep 26, 2020 · 2 comments

Comments

@pr4xx
Copy link

pr4xx commented Sep 26, 2020

This lib uses only get requests for its api communication. setHTML suppots post requests. I am trying to set a larger html text which fails.

@0x46616c6b
Copy link
Owner

Can you give an example on which size of HTML the requests fails? Maybe we can cover this with a test or it's maybe solved in a newer version of Etherpad. (I need to update the version the client tests against)

@steinm
Copy link

steinm commented Oct 29, 2021

I just ran into this problem as well. The problem with passing large amounts of data (usually more than 8k) in a get request isn't specific to etherpad. Many web servers do not allow more than 8k in a get request. The etherpad docs say:

If your text is long (>8 KB), please invoke via POST and include text parameter in the body of the request, not in the URL (since Etherpad 1.8).

I'm not very familiar with guzzle, but I guess you just need to change the $client->get(..) into a $client->post(...) for some api functions. Starting with setText() might be a good test.

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

No branches or pull requests

3 participants