Thanks, Urs!

> Am 10.03.2018 um 12:03 schrieb Urs Schoenenberger 
> <urs.schoenenber...@gmail.com>:
> 
> Hey Heiko,
> 
> I dug into the source code at this point recently, and unfortunately I don't 
> think that what you need is easily possible without changing the library.
> Some headers (Content-Length, Content-Type, Transfer-Encoding) are consumed 
> by the HttpMessageParser without exposing them via the request's "headers" 
> field later.
> This happens during the "parsing" stage in HttpServerBluePrint, which 
> consumes the incoming ByteStrings. Neither the HttpServerBluePrint nor the 
> underlying HttpRequestParser/HttpMessageParser are injectable without copying 
> substantial parts of the library code into your application, as far as I can 
> see.
> If you can use a patched version of Akka HTTP, I'd probably change the 
> recursive call in HttpMessageParser::parseHeaderLines to pass "headers += h" 
> for the Content-Type case, then you have access to the interpreted header 
> through httpRequest.entity.contentType and to the raw header via 
> httpRequest.headers.
> 
> Urs
> 
> On Thursday, March 1, 2018 at 8:58:10 PM UTC+1, Heiko Seeberger wrote:
> Nobody?
> 
>> Am 24.02.2018 um 19:12 schrieb Heiko Seeberger <loe...@posteo.de <>>:
>> 
>> Hey, Akka HTTP experts, 
>> 
>> Akka HTTP treats the Content-Type header in a special way (seemingly 
>> according to the spedification). In particular if the request contains 
>> neither a Content-Type header nor entity data, it sets the Content-Type to 
>> "application/octet-stream“.
>> 
>> This seems to be in sync with the HTTP spec (7.2.1). Is there a way to see 
>> that the raw request did not contain the Content-Type header?
>> 
>> Thanks
>> Heiko
>> 
>> --
>> 
>> Heiko Seeberger
>> Home: heikoseeberger.de <http://heikoseeberger.de/>
>> Twitter: @hseeberger
>> Public key: keybase.io/hseeberger <http://keybase.io/hseeberger>
>> 
>> 
>> 
>> 
>> 
>> -- 
>> >>>>>>>>>> Read the docs: http://akka.io/docs/ <http://akka.io/docs/>
>> >>>>>>>>>> Check the FAQ: 
>> >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html 
>> >>>>>>>>>> <http://doc.akka.io/docs/akka/current/additional/faq.html>
>> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user 
>> >>>>>>>>>> <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 akka-user+...@googlegroups.com <>.
>> To post to this group, send email to akka...@googlegroups.com <>.
>> Visit this group at https://groups.google.com/group/akka-user 
>> <https://groups.google.com/group/akka-user>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> >>>>>>>>>> Read the docs: http://akka.io/docs/ <http://akka.io/docs/>
> >>>>>>>>>> Check the FAQ: 
> >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html 
> >>>>>>>>>> <http://doc.akka.io/docs/akka/current/additional/faq.html>
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user 
> >>>>>>>>>> <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 akka-user+unsubscr...@googlegroups.com 
> <mailto:akka-user+unsubscr...@googlegroups.com>.
> To post to this group, send email to akka-user@googlegroups.com 
> <mailto:akka-user@googlegroups.com>.
> Visit this group at https://groups.google.com/group/akka-user 
> <https://groups.google.com/group/akka-user>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
*****************************************************************************************************
** New discussion forum: https://discuss.akka.io/ replacing akka-user 
google-group soon.
** This group will soon be put into read-only mode, and replaced by 
discuss.akka.io
** More details: https://akka.io/blog/news/2018/03/13/discuss.akka.io-announced
*****************************************************************************************************
>>>>>>>>>> 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to