scalaj / scalaj-http

Simple scala wrapper for HttpURLConnection. OAuth included.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I think that the use of content-type with lower case instead of Content-Type could lead to problems

alex1712 opened this issue · comments

commented

I think that would not find the content type if the header is written with capital letters, therefor could lead into problems.

val reqCharset: String = headers.get("content-type").flatMap(_.headOption).flatMap(ct => {

the underlying map is case-insensitive, so this is ok

commented

Sorry, maybe I am wrong but if I try this code the result is None:

val headers: Map[String, String] = Map( "Content-Type" -> "application/json" ) headers.get("content-type")

If you are sure just ignore my comment.

Thanks