[REBOL] Re: HTTP GET problem
From: tomc::darkwing::uoregon::edu at: 12-Mar-2004 16:30
to partialy answer my question for a work around
see below but the main question of why I need it is open.
On Fri, 12 Mar 2004, Tom Conlin wrote:
> Hi list,
>
> I am running into a problem I have never seen with a simple cgi get.
>
> What is to be returned is just ascii data -- no headers or anything
>
> the url for (what it is worth) looks like
>
> http://localhost:33999/perl/get_loci_names?dataset=cat&type=test_otter
>
> what should be returned looks like:
>
> Name Em:AY152827.2
> Name Em:AY152827.3
> Name DPA
> Name DPB
> Name Em:AY152828.5
> Name Em:AY152830.3
> Name Em:AY152831.5
> ...
>
> ------------------
>
> I get a rebol error where it seems to be trying to interpert the
> data as an integer instead of just dumping it out for me.
>
> >> print to-string read
> http://localhost:33999/perl/get_loci_names?dataset=cat&type=test_otter
> connecting to: localhost
> ** Script Error: Invalid argument: Em:AY152827.2
> ** Where: to-integer
> ** Near: to integer! :value
> >>
>
> a web browser (opera) returns the data just fine.
>
> this is with latest view stable & beta on windows
> and core 2.5.6 on solaris
>
> any ideas for a work around or if this is a bug that needs fixing
a work around is
port: open [scheme: 'tcp host: 127.0.0.1 port-id: 33999 timeout: 00:02:00]
req: {GET
http://localhost:33999/perl/get_loci_names?dataset=cat&typetest_otter
HTTP/1.0^/^/}
insert port req
wait port
result: copy port
close port
probe result