omaha-consulting / omaha-server

Google Omaha ("Chromium Update") server
https://omaha-consulting.com
Other
209 stars 82 forks source link

400 Bad request - lxml #330

Closed traffisco closed 5 years ago

traffisco commented 5 years ago

Hi, I'm getting 400 bad request error running the omaha client. Running the server tests shows the error origin. Any know issues in lxml library?

......................ERROR:omaha.views:UpdateView Traceback (most recent call last): File "/srv/omaha/omaha_server/omaha/views.py", line 50, in post response = build_response(request.body, ip=get_client_ip(request)) File "/srv/omaha/omaha_server/omaha/builder.py", line 179, in build_response obj = parse_request(request) File "/srv/omaha/omaha_server/omaha/parser.py", line 81, in parse_request obj = objectify.fromstring(request, parser) File "src/lxml/lxml.objectify.pyx", line 1801, in lxml.objectify.fromstring (src/lxml/lxml.objectify.c:25171) File "src/lxml/lxml.etree.pyx", line 3213, in lxml.etree.fromstring (src/lxml/lxml.etree.c:77697) File "src/lxml/parser.pxi", line 1819, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:116494) File "src/lxml/parser.pxi", line 1707, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:115144) File "src/lxml/parser.pxi", line 1079, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:109543) File "src/lxml/parser.pxi", line 573, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:103404) File "src/lxml/parser.pxi", line 683, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:105058) File "src/lxml/parser.pxi", line 622, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:104143) XMLSyntaxError: line 1: Start tag expected, '<' not found F...............WARNING:py.warnings:/opt/venv/lib/python2.7/site-packages/django/db/models/fields/__init__.py:1453: RuntimeWarning: DateTimeField Request.created received a naive datetime (2015-01-01 00:00:00) while time zone support is active. RuntimeWarning) .warnings:/opt/venv/lib/python2.7/site-packages/django/db/models/fields/__init__.py:1453: RuntimeWarning: DateTimeField Request.created received a naive datetime (2015-07-07 00:00:00) while time zone support is active. RuntimeWarning)

FAIL: test_bad_request (omaha.tests.test_views.UpdateViewTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/srv/omaha/omaha_server/omaha/tests/test_views.py", line 359, in test_bad_request self.assertEqual(response.content, msg) AssertionError: '<?xml version="1.0" encoding="utf-8"?>\n<data>\n <message>\n Bad Request!\n </message>\n</data>' != '<?xml version="1.0" encoding="utf-8"?>\n<data>\n <message>\n Bad Request\n </message>\n</data>'

traffisco commented 5 years ago

found the issue: https://github.com/Crystalnix/omaha-server/issues/331