comp.lang.ada
 help / color / mirror / Atom feed
* AWS vs encode '#'
@ 2016-12-20  0:14 Stephen Leake
  2016-12-20 15:55 ` Pascal Obry
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Leake @ 2016-12-20  0:14 UTC (permalink / 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?

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-12-23 21:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-20  0:14 AWS vs encode '#' Stephen Leake
2016-12-20 15:55 ` 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

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