Kaynağa Gözat

cherrypy: Add Content-Type header for plaintext

INADA Naoki 10 yıl önce
ebeveyn
işleme
7427663961
1 değiştirilmiş dosya ile 1 ekleme ve 0 silme
  1. 1 0
      frameworks/Python/cherrypy/app.py

+ 1 - 0
frameworks/Python/cherrypy/app.py

@@ -59,6 +59,7 @@ class CherryPyBenchmark(object):
 
     @cherrypy.expose
     def plaintext(self):
+        cherrypy.response.headers["Content-Type"] = "text/plain"
         return "Hello, world!"
 
     @cherrypy.expose