Likely because of the fix for this bug:
https://github.com/akka/akka-http/issues/1134

Before 10.0.8 Akka HTTP would just blindly guess the charset UTF-8 even if
the request did not specify a charset, while now it has a specific type
representing a missing charset instead to give user server logic a chance
decide what to do.

--
Johan
Akka Team

On Tue, Jun 27, 2017 at 6:33 PM, Christophe Pache <chpa...@gmail.com> wrote:

> The difference seams to come from that (using request logging):
> HttpEntity.Strict(application/x-www-form-urlencoded; charset=UTF-8,foo=bar
> )
> becomes
> HttpEntity.Strict(application/x-www-form-urlencoded,ByteString(102, 111,
> 111, 61, 98, 97, 114))
>
> so is fixed using the charset.
>
> Le lundi 26 juin 2017 07:53:29 UTC+2, Christophe Pache a écrit :
>>
>> Hello everyone!
>>
>> I'm using forms in a akka-http app and I have an issue with
>> `formFieldMap` directive: it start to fail after a akka update (akka-http
>> 10.0.6 -> 10.0.8 and  akka 2.5.1 -> 2.5.3).
>> I feel like the FormData was not required before this change (as some of
>> my test use also akka-http, was fine to just add an empty FormData and it
>> solved the issue).
>>
>>
>> My main question is: if I don't provide a form data in my request, would
>> a directive formFieldMap be taken or not? What about the parameterMap which
>> seams taken even if empty?
>>
>> I'm stuck currently trying to make test using basic HttpURLConnection work
>> with the update (was working before). Have someone already tested
>> formFieldMap/Seq without akka-http test support? Here is part of code I'm
>> using to test:
>>
>> val conn: HttpURLConnection = createHttpConnection(urlEndpoint)
>> conn.setRequestMethod("GET")
>> conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded")
>> val postDataBytes: Array[Byte] = "foo=bar".getBytes(*"UTF-8"*)
>> conn.setRequestProperty("Content-Length", 
>> String.valueOf(postDataBytes.length))
>> conn.getOutputStream.write(postDataBytes)
>>
>> val response: Int = conn.getResponseCode
>> val inputStream: InputStream = conn.getInputStream
>> (readUtf8InputStream(inputStream), conn.getHeaderFields)
>>
>>
>>
>>
>> Many thanks for any hint and have a nice day!
>> Christophe
>>
> --
> >>>>>>>>>> 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.
>

-- 
>>>>>>>>>>      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