Adds 415 response for any non-empty Accept header different from application/json or text/csv. Uses apropriate Content-Type header when sending CSV format.

This commit is contained in:
Diogo Biazus
2015-08-20 20:47:36 -07:00
committed by Joe Nelson
parent cb7d00b839
commit 3b017dfdf6
6 changed files with 81 additions and 43 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ spec = around withApp $ describe "CORS" $ do
("Host", "localhost:3000"),
("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0"),
("Origin", "http://localhost:8000"),
("Accept", "text/plain, */*; q=0.01"),
("Accept", "text/csv, */*; q=0.01"),
("Accept-Language", "en-US,en;q=0.5"),
("Accept-Encoding", "gzip, deflate"),
("Referer", "http://localhost:8000/"),