TCP question
[1/4] from: robert:muench:robertmuench at: 10-Mar-2004 19:40
Hi, I'm playing around with client/server via TCP. I'm using the
http-post-form function on the client side. I want to send a binary file
to the server and write it than to a file. Here is what I do:
===Client
http-post-form <URL> reduce reduce ["data" to-string compress read/binary
%test.bin]
===Server
write/binary %test1.bin decompress to-binary request/data
And this is the error I get on the server side:
** Script Error: Not enough memory
** Where: switch
** Near: write/binary %test1.bin decompress to-binary request/data
What's the problem here? I think it has something to do that the binary
data gets mangeled while doing the POST. Is GET the better way? I just
want to be able to pack arbitrary data and send it via a CGI to a running
Rebol process, unpack and process it there.
The strange thing is that the code works for a binary file with size 1000 bytes. Hmm...
wasn't this the POST limit? Robert
[2/4] from: robert:muench:robertmuench at: 18-Mar-2004 9:15
On Wed, 10 Mar 2004 19:40:11 +0100, Robert M. M=FCnch
<[robert--muench--robertmuench--de]> wrote:
> Hi, I'm playing around with client/server via TCP. I'm using the
> http-post-form function on the client side. I want to send a binary file
> to the server and write it than to a file. Here is what I do:
> ...
Hi, I'm still trying to get this problem solved... can any network guru
give some idea what I'm doing wrong? I just want to use Rebols build in
compress and encrypt to send rebol molded data and binary data via HTTP.
Robert
[3/4] from: maarten:vrijheid at: 18-Mar-2004 10:16
Step 1: try it on different webservers.
Step 2: Run REBOL standalone in CGI mode with data redirected to the
standard input
Step 3: mail this list again ;-)
--Maarten
Robert M. M=FCnch wrote:
[4/4] from: robert:muench:robertmuench at: 19-Mar-2004 16:31
On Thu, 18 Mar 2004 10:16:22 +0100, Maarten Koopmans
<[maarten--vrijheid--net]> wrote:
> Step 1: try it on different webservers.
> Step 2: Run REBOL standalone in CGI mode with data redirected to the
> standard input
> Step 3: mail this list again ;-)
Hi, well there is a very easy solution:
read/custom http://localhost/cgi-bin/proxy.exe reduce ['post join
upload-data
mold compress read/binary %backdrop.png]
That's it. This forms a nice string, posts it to the proxy CGI, which
forwards it to my server listening process where I can handle it. This is
a total generic interface now. Adding compressed and encrypted
communication between a client and a server process is now very easy :-))
Robert