title: cannot convert 'bytes' object to str implicitly
body: <p>I am trying to open a gif file, and send its bytes properly to a webbrowser but it throws the exception 'cannot convert 'bytes' object to str implicitly' and frankly I am baffled, because I already converted it to a string.</p>
  
  <pre><code>files=open("WebContent/"+fileName,"rb")
  #size=os.path.getsize("WebContent/"+fileName)
  text=str(files.read())
  text=text.encode('UTF-8')
  defaultResponseCode="HTTP/1.1 200 OK\r\nContent-Type: image/gif\r\nContent-Transfer-Encoding: binary\r\nContent-Length: 29696\r\n\r\n"+text
  </code></pre>
  
  <p>Thanks in advance!</p>