Version: unspecified (using Devel) OS: Linux When pasting text, longer than 513 characters (URL-encoded 741) using the default engine 'kde' (paste.kde.org), the upload will fail. Reproducible: Always Steps to Reproduce: 1. Copy the following text (it ends in a whitespace) This is a text which is just there to test a bug in the pastebin applet This is a text which is just there to test a bug in the pastebin applet This is a text which is just there to test a bug in the pastebin applet This is a text which is just there to test a bug in the pastebin applet This is a text which is just there to test a bug in the pastebin applet This is a text which is just there to test a bug in the pastebin applet This is a text which is just there to test a bug in the pastebin applet This is 2. Paste it using the 'kde' engine to the pastebin applet 3. It works 4. Add a single character to the previous text, so copy the following text: This is a text which is just there to test a bug in the pastebin applet This is a text which is just there to test a bug in the pastebin applet This is a text which is just there to test a bug in the pastebin applet This is a text which is just there to test a bug in the pastebin applet This is a text which is just there to test a bug in the pastebin applet This is a text which is just there to test a bug in the pastebin applet This is a text which is just there to test a bug in the pastebin applet This is a 4. Paste it using the 'kde' engine to the pastebin applet Actual Results: 3. works 4. doesn't work Expected Results: 3. works 4. works Although the error is caused by the application running on paste.kde.org, I believe this could be solved in the shareprovider engine. It currently uses GET as submit method, while the form on paste.kde.org uses POST to submit the data. Using: KDE 4.7.90 (4.8.0 beta2) Qt 4.7.4
Hello, Thanks for reporting! The 'GET' shouldn't be a problem as it's supported by the API: http://paste.kde.org/doc/api/ Other backends work well with the same text. Interesting. I'll investigate but it would be good if you could take a look too as I'm a little bit out of time. Thanks!
This is a good junior job for someone looking into starting kde development :)
The problem is indeed the GET method (probably the URL becomes too long?) since changing function method() { return "GET"; } to function method() { return "POST"; } in kde/kde-workspace/plasma/generic/dataengines/share/backends/kde/contents/code/main.js make the plasmoid works with long text (cfr. http://paste.kde.org/528422/)
Git commit a7d0ef49cb7839d42646334459f1140ed32c0a41 by Feng Chao. Committed on 10/04/2013 at 15:44. Pushed by fengchao into branch 'master'. Fix Bug 289647 - Default text engine 'kde' fails when pasting text longer than 513/741 characters Use "post" instead of "get" method for kde paste bin. HTTP get method only support 1024 url length. FIXED-IN: 4.11.0 M +1 -1 plasma/generic/dataengines/share/backends/kde/contents/code/main.js http://commits.kde.org/kde-workspace/a7d0ef49cb7839d42646334459f1140ed32c0a41