]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
server/xmlrpc: send back 503 response with correct encoding
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 13 Dec 2016 07:07:03 +0000 (20:07 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 14 Dec 2016 09:54:48 +0000 (09:54 +0000)
If you send back a string here you get "TypeError: 'str' does not
support the buffer interface" errors in bitbake-cookerdaemon.log and
"IncompleteRead(0 bytes read, 22 more expected)" errors on the client
side.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/server/xmlrpc.py

index 452f14bb321c99e34acc7ac33e6741e5c98f4272..a06007f5ac093d33f6d423973a85c0254a215967 100644 (file)
@@ -190,7 +190,7 @@ class BitBakeXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
         self.send_header("Content-type", "text/plain")
         self.send_header("Content-length", str(len(response)))
         self.end_headers()
-        self.wfile.write(response)
+        self.wfile.write(bytes(response, 'utf-8'))
 
 
 class XMLRPCProxyServer(BaseImplServer):