Hello Johannes.I see that it is not valid query. But I cannot control client and I want to process the request some way even with non-valid query.I also use spray.can.server.parsing.uri-parsing-mode = relaxed but it does not help, the error is thrown in this case too.Hi Igor,
On Fri, Sep 20, 2013 at 7:25 PM, Igor Nemilentsev <tre...@gmail.com> wrote:
> [spray.can.server.HttpServerConnection] -
> Illegal request, responding with status '400 Bad Request': Illegal
> request-target, unexpected character '=' at position 96:
> /__adutm.gif?adv=20130915&adbn=Chrome&adbv=25.0.1364.172&adsr=http://yandex.ru/clck/jsredir?from=yandex.ru;yandsearch;web;;&text=
that doesn't look like a valid query. See [1] about which characters
are not allowed in a valid query.
That said, you can control the strictness of spray's URL parsing with the
spray.can.server.parsing.uri-parsing-mode
setting. See [2]
--You received this message because you are subscribed to the Google Groups "spray-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spray-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Igor,
On Sun, Sep 22, 2013 at 9:03 PM, Igor Nemilentsev <tre...@gmail.com> wrote:Hello Johannes.I see that it is not valid query. But I cannot control client and I want to process the request some way even with non-valid query.I also use spray.can.server.parsing.uri-parsing-mode = relaxed but it does not help, the error is thrown in this case too.Hi Igor,
On Fri, Sep 20, 2013 at 7:25 PM, Igor Nemilentsev <tre...@gmail.com> wrote:
> [spray.can.server.HttpServerConnection] -
> Illegal request, responding with status '400 Bad Request': Illegal
> request-target, unexpected character '=' at position 96:
> /__adutm.gif?adv=20130915&adbn=Chrome&adbv=25.0.1364.172&adsr=http://yandex.ru/clck/jsredir?from=yandex.ru;yandsearch;web;;&text=The value of adsr parameter must be url encoded.The best way you can process this request is by returning some error to the client, e.g. 400 Bad Request. Doing anything else would be wrong and will lead to more problems later.How any parser can realize that 'text' parameter (at the very end of the uri) is part of the adsr's value and not a query string parameter to __adutm.gif ? Since the value of adsr is not url encoded the parser cannot make such assumptions.