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=0.5 required=5.0 tests=BAYES_00,TO_NO_BRKTS_PCNT autolearn=no autolearn_force=no version=3.4.4 X-Received: by 10.157.62.7 with SMTP id a7mr966408otd.106.1482192891365; Mon, 19 Dec 2016 16:14:51 -0800 (PST) X-Received: by 10.157.56.132 with SMTP id p4mr872109otc.20.1482192891327; Mon, 19 Dec 2016 16:14:51 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!b123no1841304itb.0!news-out.google.com!c1ni10496itd.0!nntp.google.com!b123no1841302itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 19 Dec 2016 16:14:50 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=76.218.37.33; posting-account=W2gdXQoAAADxIuhBWhPFjUps3wUp4RhQ NNTP-Posting-Host: 76.218.37.33 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: AWS vs encode '#' From: Stephen Leake Injection-Date: Tue, 20 Dec 2016 00:14:51 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:32919 Date: 2016-12-19T16:14:50-08:00 List-Id: I'm working on a web server that handles downloading music to my PDA, using= AWS. One of the music file names is (in part): 01 The Dance #1.mp3 The "#" is part of the file name; it does _not_ indicate a "fragment" part = of a URL. However, if I send a properly encoded "GET" request to the AWS server: GET .../01%20The%20Dance%20%231.mp3 it arrives in my Handle_Request subprogram with "#1.mp3" in the fragment pa= rt of the URL (just wrong!). Tracing through the code, the socket is read in aws-server-http_utils.adb G= et_Request_Line. That calls aws-server-http_utils.adb Parse_Request_Line, w= hich _decodes_ the resource string, _then_ calls Status.Set.Request which c= alls URL.Set.Parse, which puts the "#.mp3" in the fragment. URL.Decode should be called _after_ URL.Set.Parse, not before. Has anyone else seen this?=20 I find it hard to believe such a fundamental bug is in AWS; am I missing so= mething?