[oe-commits] [bitbake] 04/15: server/xmlrpc: send back 503 response with correct encoding

git at git.openembedded.org git at git.openembedded.org
Wed Dec 14 09:57:45 UTC 2016


rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 0d659a7dfe5fb096f8aa4380320f9e2a464b3cb5
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Tue Dec 13 20:07:03 2016 +1300

    server/xmlrpc: send back 503 response with correct encoding
    
    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 at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/server/xmlrpc.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/server/xmlrpc.py b/lib/bb/server/xmlrpc.py
index 452f14b..a06007f 100644
--- a/lib/bb/server/xmlrpc.py
+++ b/lib/bb/server/xmlrpc.py
@@ -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):

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list