Here is an example of an URL that works fine without the proxy, but causes a parse error when going via the proxy:
http://forum.nasaspaceflight.com/index.php?action=dlattach;topic=34835.0;attach=633689 curl "http://forum.nasaspaceflight.com/index.php?action=dlattach;topic=34835.0;attach=633689" => lots of binary data curl --proxy 127.0.0.1 "http://forum.nasaspaceflight.com/index.php?action=dlattach;topic=34835.0;attach=633689" => Illegal request-target: Invalid input ';', expected '+', query-char, '%', '&' or 'EOI' (line 1, column 59) log: [WARN] [01/31/2015 18:25:05.165] [Proxy-akka.actor.default-dispatcher-23] [ActorSystem(Proxy)] Illegal request, responding with status '400 Bad Request': Illegal request-target: Invalid input ';', expected '+', query-char, '%', '&' or 'EOI' (line 1, column 59): http://forum.nasaspaceflight.com/index.php?action=dlattach;topic=34835.0;attach=633689 Am Samstag, 31. Januar 2015 17:46:19 UTC+1 schrieb rklaehn: > > Hi all, > > While playing around with akka-http, I wrote a minimal http proxy server: > https://gist.github.com/rklaehn/3aa3215046df2c0a7795 > > To test it, I configured a browser with this as proxy and browsed some > popular news web pages that load a zillion things from ad servers, > trackers and the like. > > It works just fine, but I get a large number of warnings and the > occasional error in the log because apparently a lot of the > "secondary" traffic going over the proxy is not 100% correct according > to the HTTP spec. See some examples below. > > Is it possible to tell akka-http to ignore errors such as > IllegalResponseException and just pass through everything? I don't see > a single line of my own code in the stack traces, so I am a bit at a > loss how to approach this. > > Cheers, > > Rüdiger > > --- > Opening connection to weltonline01.webtrekk.net > [WARN] [01/31/2015 17:33:42.631] > [MinimalProxy-akka.actor.default-dispatcher-70] > [ActorSystem(MinimalProxy)] Illegal request header: Illegal 'cookie' > header: Invalid input ',', expected tchar, '\r', WSP or '=' (line 1, > column 32): C=1; cid=-6251207954767438390,0,0,0,0; > uid=-6251207954767438390 > ^ > Opening connection to track.adform.net > [WARN] [01/31/2015 17:33:42.679] > [MinimalProxy-akka.actor.default-dispatcher-56] > [ActorSystem(MinimalProxy)] Illegal response header: Illegal > 'content-type' header: Invalid input ':', expected tchar, '\r', WSP or > '/' (line 1, column 13): Content-type: image/gif; charset=utf-8 > ^ > [WARN] [01/31/2015 17:33:42.680] > [MinimalProxy-akka.actor.default-dispatcher-52] > [ActorSystem(MinimalProxy)] Explicitly set HTTP header 'content-type: > Content-type: image/gif; charset=utf-8' is ignored, illegal RawHeader > Opening connection to comcluster.cxense.com > [ERROR] [01/31/2015 17:33:42.716] > [MinimalProxy-akka.actor.default-dispatcher-78] > [akka://MinimalProxy/user/$a/flow-15752-broadcast] failure during > processing > akka.http.model.IllegalResponseException: Illegal character ' ' in header > name > at > akka.http.engine.client.HttpClient$$anonfun$2.applyOrElse(HttpClient.scala:89) > > > at > akka.http.engine.client.HttpClient$$anonfun$2.applyOrElse(HttpClient.scala:86) > > > at akka.stream.impl.fusing.Collect.onPush(Ops.scala:37) > ... > -- >>>>>>>>>> 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.
