Commit graph

92 commits

Author SHA1 Message Date
Gina Häußge
7beabf953c Fixed user unit tests 2017-02-17 13:43:47 +01:00
Gina Häußge
6bd788a83f Always define pixfmt for timelapse in video filter chain
Apparently having a chain AND the pix_fmt parameter
produces issues with higher resolutions.

Should fix #1317
2017-01-17 13:03:27 +01:00
Gina Häußge
e6dd37e26e Various analysis queue fixes
* Fix priority queue sorting (sorts ascending, not descending!)
  * Abort low priority jobs when a high priority job comes in
  * Utilize queue for tracking aborted jobs too
  * Abort analysis for items that are to be deleted/moved (also
    fixes issue under Windows where it was impossible to delete
    a file for which the analysis was still running).
2017-01-12 18:16:42 +01:00
Gina Häußge
d28e0988fb Merge branch 'maintenance' into devel 2016-11-07 16:18:26 +01:00
Gina Häußge
2952b2622e Do not hiccup on ipv6 addresses in the HTTP Host header
Fixed port extraction. Now supports hostname, hostname + port,
ipv4, ipv4 + port, ipv6, ipv6 + port

Fixes #1571
2016-11-07 16:17:16 +01:00
Gina Häußge
0d8fdfae26 Trust Tc over T when parsing temps from the firmware 2016-10-17 10:27:06 +02:00
Gina Häußge
aca3dfae49 Merge branch 'maintenance' into devel
# Conflicts:
#	CHANGELOG.md
2016-09-23 14:35:31 +02:00
Gina Häußge
080a6e9ccd Extend atomic_write to allow setting & persisting file permissions 2016-09-23 14:26:33 +02:00
Gina Häußge
53c0ad0889 Fixed unit tests for octoprint.timelapse 2016-09-16 18:35:30 +02:00
Gina Häußge
b6fbbb353a Merge branch 'maintenance' into devel
# Conflicts:
#	CHANGELOG.md
#	src/octoprint/filemanager/storage.py
#	src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2
2016-09-09 12:31:29 +02:00
Gina Häußge
bbe6e44d44 Only use non-postfixed cookie if no postfixed one exists
Example:

  * both "session" and "session_P5000" cookies available: "session" value from "session_P5000"
  * only "session" cookie available: "session" value from "session"
  * only "session_P5000" cookie available: "session" value from "session_P5000"
2016-09-08 15:42:51 +02:00
Gina Häußge
53b74f9caa Only construct HTTP_HOST header from SERVER_NAME and _PORT if it's unset
If HTTP_HOST is set, following PEP333 it takes precedence over SERVER_NAME and
_PORT, so we set those from it.
2016-09-08 15:18:09 +02:00
Gina Häußge
2b22d26eac Fixed a small issue with RFC 5987 headers arriving as unicode in parser
Also added API docs regarding header encoding, incl support for RFC 5987
for filename fields in Content-Disposition headers in multipart/form-data
parts, incl. an example of an upload request with a utf-8 encoded filename.
2016-09-07 18:44:46 +02:00
Gina Häußge
64d484bd09 Merge branch 'maintenance' into devel
# Conflicts:
#	src/octoprint/server/__init__.py
#	src/octoprint/util/jinja.py
2016-09-07 17:22:37 +02:00
Gina Häußge
13728c231c Also explicitely support ISO-8859-1 encoded multipart headers
Solves an issue with clients encoding filenames in multipart
 headers in ISO-8859-1, causing an HTTP 500 response code.

 This change makes ISO-8859-1 encoded headers work, sends
 a 400 Bad Request instead of 500 Internal Server Error if the
 request multipart headers cannot be decoded as either UTF-8
 or ISO-8859-1, defines UTF-8 content type for multipart text
 fields in rebuilt body and also adds support for RFC 5987 for the
 multipart file upload "filename" header component.
2016-09-07 17:03:59 +02:00
Gina Häußge
9d9eb3390d Cookie names are now port specific, based on the request associated with a response
* make sure server_port headers are properly set in reverse proxied scenarios
  * overwrite request and response classes to
    * always apply reverse proxy environment changes (so far missing for tornado
      context)
    * strip cookie name suffixes from cookie names on requests and
    * be sure to set cookie name suffixes for cookie names on responses
    * include script root in path used for cookies
  * some minor refactoring in octoprint.server setup routines
  * removed ReverseProxied class (didn't work for tornado context)
  * add unit tests for the whole reverse proxy, request and response customization
2016-09-05 12:06:56 +02:00
Gina Häußge
cba742a94f Fix some more left-overs of py2<->py3 PRs
Related to #1411, #1414 and #1415
2016-07-15 12:46:53 +02:00
Gina Häußge
7ed1f4cb9e umask test also needs to use different octal syntax
Related to #1414
2016-07-15 12:37:11 +02:00
Gina Häußge
47b7acdfbc Merge branch 'dev/python3A' of https://github.com/ByReaL/OctoPrint into pr/ByReaL/dev/python3A
Conflicts:
	src/octoprint/plugins/virtual_printer/virtual.py
	src/octoprint/printer/standard.py
2016-07-15 12:28:19 +02:00
Gina Häußge
76a04cbe9d Merge branch 'dev/python3B' of https://github.com/ByReaL/OctoPrint into pr/ByReaL/dev/python3B 2016-07-15 11:28:55 +02:00
MirceaDan
c33a9f9aa2 from __future__ import absolute_import, division, print_function
changed the behavior to import division and print to be consistent
across all app and similar with python 3.x
2016-07-15 00:16:58 -07:00
MirceaDan
149cc8c7c5 python 3 changes exceptions, queue and asesrtEqual
1) import Queue is now lower caps

2) exceptions
except KeyError as e:

3) assertEquals is deprecated but assertEqual does exactly same thing
2016-07-14 23:53:39 -07:00
Gina Häußge
18243e49a6 Fix a failing unit test 2016-07-13 11:25:03 +02:00
Gina Häußge
015b99fa14 Fix plugin unit tests 2016-06-28 11:02:44 +02:00
Gina Häußge
3b2af5b7ed Fix settings unit tests 2016-06-28 10:57:51 +02:00
Gina Häußge
73ba5b05a9 Add unit tests for settings 2016-06-28 10:29:05 +02:00
Kyle Evans
75f8facb05 Make Server class octoprint_daemon-aware, make sure terminated() gets invoked on it upon SIGTERM and update respective test 2016-05-09 09:40:50 -05:00
Gina Häußge
e28ca60f21 Merge branch 'maintenance' into devel
Conflicts:
	CHANGELOG.md
2016-02-10 16:46:56 +01:00
Gina Häußge
3fb9248d2a More timelapse unit tests 2016-02-10 16:44:46 +01:00
Gina Häußge
99c65b8cf4 Unit test for unrendered timelapse cleanup 2016-02-10 14:40:10 +01:00
Gina Häußge
ae23f09edf Merge branch 'maintenance' into devel 2016-02-09 10:46:14 +01:00
Gina Häußge
4b7552e56e Fixed file manager unit tests, added tests for print recovery functionality 2016-02-09 10:45:54 +01:00
Gina Häußge
e4828450c9 Merge branch 'fix/slugifyFilenames' into devel
Conflicts:
	setup.py
2016-01-11 16:43:38 +01:00
Gina Häußge
7743372ee4 Slugify file names on local storage
Just stripping anything non-ASCII leads to errors with UTF-8 only
filenames.

Closes #1181
2016-01-11 16:42:05 +01:00
Gina Häußge
5fb1c2d7a0 Merge branch 'fix/useIsHiddenPath' into devel 2015-11-20 10:12:33 +01:00
Gina Häußge
454f16a7c3 Fixed a broken unit test (pro tip: test new tests before committing...) 2015-11-20 10:12:15 +01:00
Gina Häußge
73d8ff9991 Merge branch 'fix/useIsHiddenPath' into devel
Conflicts:
	tests/util/test_file_helpers.py
2015-11-20 10:07:46 +01:00
Gina Häußge
a731f748d9 Moved existing hidden file checks to utilize octoprint.util.is_hidden_path 2015-11-20 10:02:06 +01:00
Gina Häußge
1f90096a89 Merge branch 'fix/hiddenTemplatesListed' into devel
Conflicts:
	src/octoprint/util/__init__.py
	tests/util/test_file_helpers.py
2015-11-19 19:04:21 +01:00
Gina Häußge
83f66e133e Do not include hidden files in listed gcode scripts 2015-11-19 18:58:56 +01:00
Gina Häußge
ab97abf13e Some fixes and unit tests for octoprint.util.atomic_write, .bom_aware_open and .tempdir
(cherry picked from commit 4fcb853)
2015-11-19 15:15:35 +01:00
Gina Häußge
8b4aecde35 Merge branch 'devel' into dev/folderSupport 2015-11-18 17:16:12 +01:00
Gina Häußge
306fd164d7 Refactoring of localstorage and added tests
* improved internal metadata handling
  * less code duplication
  * individual locks per metadata file
  * unit tests for copy and move operations
2015-11-18 10:47:49 +01:00
Gina Häußge
4fcb853ef2 Some fixes and unit tests for octoprint.util.atomic_write, .bom_aware_open and .tempdir 2015-11-03 18:11:54 +01:00
Gina Häußge
56805ab13d Refactored Daemon helper, added status command and added unit tests for all of it 2015-10-29 12:45:58 +01:00
Gina Häußge
a53195d2a0 Added Unit Tests for BlueprintPlugin mixin
(cherry picked from commit 53a62ab)
2015-10-26 09:15:54 +01:00
Gina Häußge
b4cb0dec87 Unit tests and some fixes for improved plugin settings processing
(cherry picked from commit bcd0f34)
2015-10-26 08:53:08 +01:00
Gina Häußge
53a62ab44e Added Unit Tests for BlueprintPlugin mixin 2015-10-22 11:07:55 +02:00
Gina Häußge
bcd0f34fc3 Unit tests and some fixes for improved plugin settings processing 2015-10-20 17:57:05 +02:00
Gina Häußge
d34790e74e Unit tests for octoprint.util.RepeatedTimer
(cherry picked from commit 7362067)
2015-10-20 12:07:31 +02:00