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

Comments

Projects
None yet
3 participants
@foofoodog
Copy link

commented Jun 29, 2015

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

This comment has been minimized.

Copy link
Author

commented Jun 29, 2015

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

@jneilliii

This comment has been minimized.

Copy link

commented Jun 29, 2015

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

This comment has been minimized.

Copy link
Author

commented Jun 29, 2015

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

This comment has been minimized.

Copy link
Owner

commented Jun 29, 2015

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

@foofoodog

This comment has been minimized.

Copy link
Author

commented Jun 29, 2015

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

This comment has been minimized.

Copy link
Owner

commented Jun 29, 2015

more than 100k would be great ;)

@foofoodog

This comment has been minimized.

Copy link
Author

commented Jun 29, 2015

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

@foosel

This comment has been minimized.

Copy link
Owner

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

This comment has been minimized.

Copy link
Author

commented Jun 29, 2015

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

This comment has been minimized.

Copy link
Owner

commented Jun 29, 2015

git remote -v | grep origin ?

@foofoodog

This comment has been minimized.

Copy link
Author

commented Jun 30, 2015

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.

@foofoodog foofoodog closed this Jun 30, 2015

@jneilliii

This comment has been minimized.

Copy link

commented Jun 30, 2015

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

This comment has been minimized.

Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.