Hi all,

I'm trying to proxy a chunked HTTP request over to a different server and 
have that handle the request with akka-http and akka-streams. 

So on the first server I have:
extract(_.request) { request =>
                    complete { 
                      lazy val httpActorConnectionFlow: Flow[HttpRequest, 
HttpResponse, Any] = Http().outgoingConnection(host, port) 
                      val x = 
Source.single(request).via(httpActorConnectionFlow).runWith(Sink.head) 
                      x }}



On the second server I have


extract(_.request.entity.dataBytes) { dataBytes =>

          complete { 

              dataBytes.transform( () => parseLines("\n") ).runFold(1L)(
receiveLine).map { count => 

                println(s"Finished: $count")

                """{"result":"Finished upload"}""".parseJson

            }

          }

        }


Receive line just prints out the line for now and parse lines is taken from 
akka docs for parsing chunks into lines.


I keep getting "akka.http.scaladsl.model.EntityStreamException: Illegal 
chunk termination" and can't think what the issue is. Does anyone have any 
ideas please?


Thanks

-- 
>>>>>>>>>>      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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to