Otherwise we might run into trouble if we have an OctoPrint instance
running on / and /octoprint2 for example - the browser will send
cookies for both instances to the /octoprint2 instance and whatever
gets processed last will overwrite the value before in Tornado's cookie
processing. This of course will nuke the login session in case of the /
cookie being sent or processed last.
Appending the path/script root to the cookie name solves this, similar
to how we circumvented an identical problem caused by browsers not
distinguishing between ports for cookies.
Solves an issue reported by @mgrl in #2095
That should solve any weird import issues we have when
running gcodeInterpreter.py directly (and hence putting
octoprint.util as first entry into the python path,
causing potential issues with imported modules such as
yaml to catch the octoprint.util.platform module instead
of the actual python platform module).
See reported problem with that by @CapnBry in #2095
Using the win32 API it's possible to prevent the intermediary server
socket from inheriting itself to subprocesses. So let's use that here.
Another bit of the solution for #2090.
Any processes inheriting the open port descriptor of that server will
cause the actual server startup to fail due to the port still being
claimed.
We can't fully prevent this under Windows thanks to fnctl not being
available and win32api being a PITA, and also close_fds on Popen not
being allowed if we also need to redirect stdout/stderr/stdin for a
process. So let's hope hardening against this problem when running
under *nix, adding a bit fat warning to never start a subprocess
during the intermediary's runtime and also moving the only actual
process we so far DID start (analysis backlog processing) to after
Tornado is running will suffice.
Fixes#2035
We were only adding one byte for "\n". That ignored that our regex
could also match "\r\n" or "\r\r" or something like that.
Our split regex now only matches one "\r" or "\n". Empty lines we'll
simply ignore anyhow so no real harm done.
Also, we no longer strip the comments in this step - leave that to
the worker running in its own thread. Not only should that speed
things up a bit, it will also allow us to better debug the worker in
the future.
We were just testing if z_heights[z] was truthy. If the layer index was
set but 0 that wasn't properly detected and let to overwriting our
layer information. Instead check explicitly against undefined.
Closes#2017
* remove some more "fa" classes where they didn't belong
* use "fa-toggle-(on|off)" instead of circles where they were used
to signify toggle actions
* fix SD card icon being too high
Another follow-up to #1915
So far we only supported \n and \r\n, leading to problems with MM
GCODE files generated by Slic3r Prusa Edition which apparently
produces \r line endings for some reason.
Closes#1996
Clicking terminal output (excluding highlighting) will set focus to terminal command
Change fancy functionality style from muted to warning so that it stands out more