Hi!
For testing purpose I started an http-endpoint which looks like this ...I
removed some code to make it simple
object WebServer extends HttpApp {
def route: Route =
path("publishvalid") {
optionalHeaderValueByName("Content-Type") { header =>
println("Content-Type is "+header)
post {
complete("")
}
}
}
}
The server I use to check if the client I worte is setting the expected
content-type which is "application/json". Unfortunatly the type was never
set, at least Content-Type was always none.
Thats why I started to use Postman to test my little WebServer where I made
the following observation.
While seeting the content-type to application-json my server was telling me
the content-type was not found. If I used one which is not defined the
content-type was available. See the logs below
Code hier eingeben...2017-04-04 14:12:59,894 INFO ActorSystemImpl - Server
online at http://127.0.0.1:8111/
/// Conente Type in postman was set to application/json
Content-Type is None
/// Conente Type in postman was set to bla bla
Content-Type is Some(bla bla)
2017-04-04 14:13:15,762 WARN ActorSystemImpl - Illegal request header:
Illegal 'content-type' header: Invalid input 'b', expected WSP, CRLF or '/'
(line 1, column 5): bla bla
^
For me it seems optionalHeaderValueByName as well HeaderValueByName only
returning the header if it is a user defined and not an existing.
For me this is an unexpected behaviour.
Regards
Wolfgang
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.