Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

uploading via http

 [1/11] from: gchiu::compkarori::co::nz at: 23-Mar-2002 9:09


Has anyone got any examples of how to send binary data to a webserver using http? ( not FTP ) I presume it involves setting headers, and encoding the data ... but can it also be sent as binary without encoding? I want to post some images to a web server that I don't have ftp access. thanks, -- Graham Chiu

 [2/11] from: gchiu:compkarori at: 24-Mar-2002 12:32


On Sat, 23 Mar 2002 09:09:28 +1200 "Graham Chiu" <[gchiu--compkarori--co--nz]> wrote:
> Has anyone got any examples of how to send binary data to > a > webserver using http? ( not FTP ) >
Well, my first attempt hasn't been too successful. I managed to upload a 5k gif image, but the image at the other end is 53 bytes larger, and the extra bytes are throughout the image data :( -- Graham Chiu

 [3/11] from: brett:codeconscious at: 24-Mar-2002 11:46


Hi Graham, How are you doing it? Are you using binary modes? Brett.

 [4/11] from: gchiu:compkarori at: 24-Mar-2002 16:42


On Sun, 24 Mar 2002 11:46:12 +1100 "Brett Handley" <[brett--codeconscious--com]> wrote:
> Hi Graham, > > How are you doing it? Are you using binary modes? >
Hi Brett, You got it :( http-port-private: open/lines [ scheme: 'tcp port-id: port-spec/port-id timeout: port-spec/timeout host: port-spec/host user: port-spec/user pass: port-spec/pass ] -- Graham Chiu

 [5/11] from: gchiu:compkarori at: 24-Mar-2002 19:43


On Sun, 24 Mar 2002 16:42:21 +1200 "Graham Chiu" <[gchiu--compkarori--co--nz]> wrote:
> http-port-private: open/lines [ > scheme: 'tcp
Changing this to open/binary hasn't been so successful. The server doesn't understand my request :( As I understand it, with open/lines, there is automatic conversion of line feeds to CR + LF, and each insert is also followed by a line terminator. Is there anything else? -- Graham Chiu

 [6/11] from: brett:codeconscious at: 24-Mar-2002 19:24


Hi Graham, My knowledge of this is rudimentry. What mechanism / protocol are you attempting to use to do the upload? http put or html form upload or something else? Do you have an RFC to look at? Brett.

 [7/11] from: gchiu:compkarori at: 24-Mar-2002 22:37


On Sun, 24 Mar 2002 19:24:57 +1100 "Brett Handley" <[brett--codeconscious--com]> wrote:
> My knowledge of this is rudimentry. What mechanism / > protocol are you > attempting to use to do the upload? > http put or html form upload or something else? Do you
Hi Brett, I'm attempting an http upload of enctype="multipart/form-data". Using Ethereal, the protocol/packet analyser, I've found what the problem was. I was only sending \n, whereas I needed to send \r\n after each line. So, I've just now managed to successfully upload a gif in this fashion. Since the port is in binary mode, I'll have to redo the way I read the response back :( At least I'm making progress :) ps: it seems like there is a 1 - 2 hour lag between posts and the posts appearing on this mailing list :(( -- Graham Chiu

 [8/11] from: rotenca:telvia:it at: 24-Mar-2002 13:14


Hi Graham,
> ps: it seems like there is a 1 - 2 hour lag between posts > and the posts appearing on this mailing list :((
the delay is random and i see messages on escribe many many hours before my email --- Ciao Romano

 [9/11] from: g:santilli:tiscalinet:it at: 24-Mar-2002 11:59


Hi Graham, On Sunday, March 24, 2002, 8:43:08 AM, you wrote: GC> Changing this to open/binary hasn't been so successful. The GC> server doesn't understand my request :( That's because this way the header will not be sent correctly. You have two choices: either changing the port mode after sending the header (with set-modes), or try sending a Content-Transfer-Encoding header with value "base64" hoping that your server handles it (IIRC it's in the standard, but I might be wrong - it's been long since I read it). Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [10/11] from: gchiu:compkarori at: 25-Mar-2002 7:42


On Sun, 24 Mar 2002 11:59:21 +0100 Gabriele Santilli <[g--santilli--tiscalinet--it]> wrote:
> have two choices: either changing the port mode after > sending the > header (with set-modes), or try sending a
Hi Gabriele, I've got it working now, but using 'set-modes seems a cleaner way to do it. Didn't know that function existed. I'll try that as well. -- Graham Chiu

 [11/11] from: carl:cybercraft at: 25-Mar-2002 8:45


On 25-Mar-02, Romano Paolo Tenca wrote:
> Hi Graham, >> ps: it seems like there is a 1 - 2 hour lag between posts >> and the posts appearing on this mailing list :(( > the delay is random and i see messages on escribe many many hours > before my email
Ditto for me. It didn't used to be like this though. Anyone have any inkling why this should have started to happen? -- Carl Read