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

400 Bad request - lxml #330

Closed
traffisco opened this issue Jan 10, 2019 · 1 comment
Closed

400 Bad request - lxml #330

traffisco opened this issue Jan 10, 2019 · 1 comment

Comments

@traffisco
Copy link

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
Copy link
Author

found the issue:
#331

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant