From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer04.fr7!futter-mich.highwinds-media.com!news.highwinds-media.com!fx40.am4.POSTED!not-for-mail From: Felix Krause Newsgroups: comp.lang.ada Message-ID: <2017072016194162222-contact@flyx.org> References: <2017071720305687401-contact@flyx.org> <2017071918093536089-contact@flyx.org> <2017071923134489971-contact@flyx.org> <2017072015354641511-contact@flyx.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: HTTP with Simple Components: Status.Kind always File User-Agent: Unison/2.2 X-Complaints-To: abuse@eweka.nl NNTP-Posting-Date: Thu, 20 Jul 2017 14:18:17 UTC Organization: Eweka Internet Services Date: Thu, 20 Jul 2017 16:19:41 +0200 X-Received-Body-CRC: 1254111182 X-Received-Bytes: 1850 X-Original-Bytes: 1674 Xref: news.eternal-september.org comp.lang.ada:47467 Date: 2017-07-20T16:19:41+02:00 List-Id: On 2017-07-20 13:57:54 +0000, Dmitry A. Kazakov said: > On 20/07/2017 15:35, Felix Krause wrote: > >> My suggestion is thus to parse the query even if you get a path. As I >> see it, this will not directly >> violate the spec. HTTP defines that: >> >> Servers SHOULD respond to invalid Request-URIs with an appropriate status code. >> >> If a path contains a '?', it is an invalid Request-URI. The SHOULD >> allows you to handle this differently without violating the spec. >> >> I look forward to your opinion. > > How about this. I could add a Boolean parameter to control the behavior: > > 1. If False everything is as it is now; > > 2. If True and the path contains either '?' or '#' (something else?), > it is parsed as if HTTP_Scheme was there. This would be fully sufficient solution. I would be grateful if you added this. Cheers, Felix