﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
1772	REST broken: KeyError: 'CONTENT-LENGTH'	tic20@…	Conrad Huang	"{{{
The following bug report has been submitted:
Platform:        Linux-4.20.8-200.fc29.x86_64-x86_64-with-fedora-29-Twenty_Nine
ChimeraX Version: 0.9 (2019-03-09)
Description
The REST remote control interface appears to be broken in the current daily builds (tested today in both Windows and Linux). The traceback comes after I start the remote interface, then go to localhost:12345/cmdline.html in the browser and attempt to send the command 'open 1pmx'.

Log:
UCSF ChimeraX version: 0.9 (2019-03-09)  
© 2016-2019 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> remotecontrol rest start port 12345

REST server started on host 127.0.0.1 port 12345  
\----------------------------------------  
Exception happened during processing of request from ('127.0.0.1', 59932)  
Traceback (most recent call last):  
File ""/opt/UCSF/ChimeraX-daily/lib/python3.7/socketserver.py"", line 316, in
_handle_request_noblock  
self.process_request(request, client_address)  
File ""/opt/UCSF/ChimeraX-daily/lib/python3.7/socketserver.py"", line 347, in
process_request  
self.finish_request(request, client_address)  
File ""/opt/UCSF/ChimeraX-daily/lib/python3.7/socketserver.py"", line 360, in
finish_request  
self.RequestHandlerClass(request, client_address, self)  
File ""/opt/UCSF/ChimeraX-daily/lib/python3.7/socketserver.py"", line 720, in
__init__  
self.handle()  
File ""/opt/UCSF/ChimeraX-daily/lib/python3.7/http/server.py"", line 426, in
handle  
self.handle_one_request()  
File ""/opt/UCSF/ChimeraX-daily/lib/python3.7/http/server.py"", line 414, in
handle_one_request  
method()  
File ""/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/rest_server/server.py"", line 90, in do_GET  
for k, vl in self._parse_post().items():  
File ""/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/rest_server/server.py"", line 129, in _parse_post  
parts = cgi.parse_multipart(self.rfile, pdict)  
File ""/opt/UCSF/ChimeraX-daily/lib/python3.7/cgi.py"", line 220, in
parse_multipart  
headers['Content-Length'] = pdict['CONTENT-LENGTH']  
KeyError: 'CONTENT-LENGTH'  
\----------------------------------------  




OpenGL version: 3.3.0 NVIDIA 410.93
OpenGL renderer: GeForce GTX 1070/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation

}}}
"	defect	closed	normal	0.9	General Controls		fixed						all	ChimeraX
