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

Tornado Content-Length too long uploading plugin. #957

Closed
foofoodog opened this issue Jun 29, 2015 · 13 comments
Closed

Tornado Content-Length too long uploading plugin. #957

foofoodog opened this issue Jun 29, 2015 · 13 comments

Comments

@foofoodog
Copy link

Uploading a plugin from the desktop fails with a "tornado.general - INFO - Malformed HTTP message from 127.0.0.1: Content-Length too long"

1.3.0-dev-7-g5f0c89c on Pi2 from Octopi image using file Octoprint-STLViewer-master.zip (116,759 bytes) from the repo.

I have read the FAQ and I love cookies as well.

@foofoodog
Copy link
Author

Changing the non uploads maxSize in src\octoprint\settings.py fixes it.

@jneilliii
Copy link
Contributor

Is that on line 106? I've had that issue before with some of the other plugins with upload capability and I think this might fix that for me as well. Hope you like my hacked together plugin (STL Viewer).

@foofoodog
Copy link
Author

Yes, 106. I guess I will clone devel again so I can create diffs since I am back here hacking on it again.
And yes I like the STL viewer, any way to show an axis so I can get an idea of the orientation? ;)

foosel added a commit that referenced this issue Jun 29, 2015
@foosel
Copy link
Member

foosel commented Jun 29, 2015

Should be fixed by the above commit, can someone please verify?

@foofoodog
Copy link
Author

You beat me to the patch. My way was brutal anyway. So you want I should test a 51 MB plugin now;) Or just one more than 100k?

@foosel
Copy link
Member

foosel commented Jun 29, 2015

more than 100k would be great ;)

@foofoodog
Copy link
Author

My git foo is so weak. I can not seem to get this code to come down. Help?

@foosel
Copy link
Member

foosel commented Jun 29, 2015

You are on the devel branch? And trying to pull from my repo, not maybe your fork or something like this?

@foofoodog
Copy link
Author

git checkout devel
Already on 'devel'
git fetch origin && git reset --hard origin/devel
HEAD is now at 5f0c89c Fix: Ensure correct "upload date" for all added files
Doing something wrong since 5f0c89c is behind

@foosel
Copy link
Member

foosel commented Jun 29, 2015

git remote -v | grep origin ?

@foofoodog
Copy link
Author

http://gnet.homelinux.com/git/OctoPrint.git.
So an OctoPi thing from back in April. That you provided a 1 line fix for 4 days ago (guysoft/OctoPi#74).

Fix is confirmed for my scenario, thank you very much.

@jneilliii
Copy link
Contributor

That fixes it for the plugin manager, but doesn't for other plugins. Should they implement the settings change the same way within their plugin?

@foosel
Copy link
Member

foosel commented Jun 30, 2015

@jneilliii yes, that's why there is a hook for that. having the body size limited for everything but whitelisted end points is to protect the server from malicious requests (large bodies can be especially problematic on something like a pi). OctoPrint can't possibly know about endpoints provided by plugins that should be whitelisted, hence that hook for them to tell it about them.

foosel added a commit that referenced this issue Jun 30, 2015
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants