W3C home > Mailing lists > Public > www-talk@w3.org > May to June 1999

GET problem with CGI

From: Phil Burk <philburk@softsynth.com>
Date: Fri, 11 Jun 1999 10:25:58 -0700
Message-ID: <376146A6.DD88968E@softsynth.com>
To: www-talk@w3.org
Hello,

I am writing a program that downloads files using the HTTP GET command.
I have tried to solve this problem myself but I am stumped. Any advice
would be much appreciated. 

Everything is fine if I GET a URL ike:

    "http://www.whatever.com/files/stuff.zip"

But when I try to download a complex URL like this one from mp3.com:

http://chooser.mp3.com/cgi-bin/download/mp3-download.cgi?fmt=0&path=/mp3s/the_bran_another_plight_of_medics_pos/shiitor.mp3&genre=1080&id=116148&ds=8

then I get this response from the server:

------------------ begin response -------------------
HTTP/1.1 400 Bad Request
Date: Fri, 11 Jun 1999 15:44:45 GMT
Server: Apache/1.3.4 (Unix) mod_perl/1.18
Connection: close
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that
this server could not understand.<P>
Invalid URI in request GET
cgi-bin/download/mp3-download.cgi?fmt=0&path=/mp3s/the_bran_another_plight_of_medics_pos/shiitor.mp3&genre=1080&id=116148&ds=8
HTTP/1.0<P>
</BODY></HTML>

-------------------- end response -------------------

I have tried both simple GET requests and 1.0 style requests with
similar results. Do I need to parse the URI further before sending the
GET request?

My GET request was simply:

  GET cgi-bin/download/..snip..148&ds=8 HTTP/1.0<Cr><Lf>
  <Cr><Lf>

Needless to say Netscape can download the file OK. BTW, I notice that
when downloading Netscape says it is downloading:

http://ds8.mp3.com/mp3s/the_bran_another_plight_of_medics_pos/shiitor.mp3

Thanks,
-- 
Phil Burk
SoftSynth.com
mailto:philburk@softsynth.com
http://www.softsynth.com
Received on Friday, 11 June 1999 13:29:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 October 2010 18:14:24 GMT