[tor-commits] [meek/master] Go back to reflecting Content-Type.

dcf at torproject.org dcf at torproject.org
Tue Sep 23 06:55:14 UTC 2014


commit b888797caf2aca1ee875da0094f684cb3d093b0d
Author: David Fifield <david at bamsoftware.com>
Date:   Mon Sep 22 23:53:05 2014 -0700

    Go back to reflecting Content-Type.
    
    We actually only really care about this in the downstream direction, and
    even then it hardly matters. It gets the right "text/plain; charset=utf-8"
    Content-Type in the response to GET; without it the middleware may sniff
    text/html or omit the charset leading to mojibake in the apostrophe.
---
 appengine/reflect.go |    1 +
 wsgi/reflect.py      |    1 +
 2 files changed, 2 insertions(+)

diff --git a/appengine/reflect.go b/appengine/reflect.go
index 416ca31..a5ac291 100644
--- a/appengine/reflect.go
+++ b/appengine/reflect.go
@@ -36,6 +36,7 @@ func pathJoin(a, b string) string {
 // bridge doesn't need to know. In responses, there may be things like
 // Transfer-Encoding that interfere with App Engine's own hop-by-hop headers.
 var reflectedHeaderFields = []string{
+	"Content-Type",
 	"X-Session-Id",
 }
 
diff --git a/wsgi/reflect.py b/wsgi/reflect.py
index be62b1a..8098a8f 100644
--- a/wsgi/reflect.py
+++ b/wsgi/reflect.py
@@ -8,6 +8,7 @@ TIMEOUT = 20
 BUFSIZ = 2048
 
 REFLECTED_HEADER_FIELDS = [
+    "Content-Type",
     "X-Session-Id",
 ]
 



More information about the tor-commits mailing list