Board index » delphi » http.get with files that have space in its name

http.get with files that have space in its name

hi

i know that filename with spaces in it ("Thats a bad filename.html") is
not a good idea.
but i have to http.get() some files with this kind of filename. If i try
to get one of these
files i receive error 404.

is ist a bug, am i doing something wrong (expact the fact getting there
idiotic files).

thanks
Stefan

 

Re:http.get with files that have space in its name


Actualy yhe name must be encoded first and it will look somthing like:

"Thats%20a%20bad%20filename.html"

Doychin

Quote
"Stefan Kilp" <k...@sk-software.de> wrote in message

news:3A1161B7.370AA23E@sk-software.de...
Quote
> hi

> i know that filename with spaces in it ("Thats a bad filename.html") is
> not a good idea.
> but i have to http.get() some files with this kind of filename. If i try
> to get one of these
> files i receive error 404.

> is ist a bug, am i doing something wrong (expact the fact getting there
> idiotic files).

> thanks
> Stefan

Re:http.get with files that have space in its name


perhaps it is helpful if you add (with urlEncode)

      1: // Get
        begin
          memoHTML.Lines.Text := HTTP.Get(urlEncode(cbURL.Text));
        end;

to the HttpClientDemo Lines 113

if i use httpclientDemo with
url=http://www.tiga-tarif.de/tiga/liveupdate/ch/Tarif.exe.zip and
other setting as default i do get the file loaded, but the HTTPWork procedure
is never called.
So i dont see the progressbar moving. Have i missed to set any other params.

Thanks
Stefan

Doychin Bondzhev schrieb:

Quote
> Actualy yhe name must be encoded first and it will look somthing like:

> "Thats%20a%20bad%20filename.html"

> Doychin

> "Stefan Kilp" <k...@sk-software.de> wrote in message
> news:3A1161B7.370AA23E@sk-software.de...
> > hi

> > i know that filename with spaces in it ("Thats a bad filename.html") is
> > not a good idea.
> > but i have to http.get() some files with this kind of filename. If i try
> > to get one of these
> > files i receive error 404.

> > is ist a bug, am i doing something wrong (expact the fact getting there
> > idiotic files).

> > thanks
> > Stefan

Re:http.get with files that have space in its name


Stefan Kilp schrieb:

Quote
> perhaps it is helpful if you add (with urlEncode)

>       1: // Get
>         begin
>           memoHTML.Lines.Text := HTTP.Get(urlEncode(cbURL.Text));
>         end;

> to the HttpClientDemo Lines 113

> if i use httpclientDemo with
> url=http://www.tiga-tarif.de/tiga/liveupdate/ch/Tarif.exe.zip and
> other setting as default i do get the file loaded, but the HTTPWork procedure
> is never called.
> So i dont see the progressbar moving. Have i missed to set any other params.

> Thanks
> Stefan

Sorry,

i haven't seen, that Kudzu allready posted that it is a bug and it will be fixed
in 8.009b.

Stefan

- Show quoted text -

Quote

> Doychin Bondzhev schrieb:

> > Actualy yhe name must be encoded first and it will look somthing like:

> > "Thats%20a%20bad%20filename.html"

> > Doychin

> > "Stefan Kilp" <k...@sk-software.de> wrote in message
> > news:3A1161B7.370AA23E@sk-software.de...
> > > hi

> > > i know that filename with spaces in it ("Thats a bad filename.html") is
> > > not a good idea.
> > > but i have to http.get() some files with this kind of filename. If i try
> > > to get one of these
> > > files i receive error 404.

> > > is ist a bug, am i doing something wrong (expact the fact getting there
> > > idiotic files).

> > > thanks
> > > Stefan

Other Threads