comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: AWS vs encode '#'
Date: Mon, 19 Dec 2016 16:14:50 -0800 (PST)
Date: 2016-12-19T16:14:50-08:00	[thread overview]
Message-ID: <dcfd4d5d-38f6-41b4-8624-531d2b25f8d0@googlegroups.com> (raw)

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 part of the URL (just wrong!).

Tracing through the code, the socket is read in aws-server-http_utils.adb Get_Request_Line. That calls aws-server-http_utils.adb Parse_Request_Line, which _decodes_ the resource string, _then_ calls Status.Set.Request which calls 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? 

I find it hard to believe such a fundamental bug is in AWS; am I missing something?

             reply	other threads:[~2016-12-20  0:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-20  0:14 Stephen Leake [this message]
2016-12-20 15:55 ` AWS vs encode '#' Pascal Obry
2016-12-20 19:55   ` Stephen Leake
2016-12-20 21:20     ` Pascal Obry
2016-12-22 20:17       ` Stephen Leake
2016-12-23  8:16         ` Simon Wright
2016-12-23 21:21           ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox