[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Marinetti 'casper' - How do I use it?
As part of a "file" submission/upload, the browser encodes the file in
base64 and includes the encoded portion as part of the HTTP POST.
The encoded portion is also "tagged" with a filename (the same file
name that the user selected from his local drive). Only the filename,
and not the full path, is included in the tag -- so the HTTP server is
free to save it off into any folder it wishes to, and it also does not
have to use the filename included in the tag.
Steven Hirsch wrote:
> glen herrmannsfeldt wrote:
> > Steven Hirsch wrote:
> >
> > (snip about binary files and HTTP, I wrote)
> >
> >>> I know that I can transfer non-HTTP binary files using
> >>> "save link target as" after right clicking on a link.
> >
> >>> I haven't thought about why no HTTP headers are added before.
> >
> >> D'oh... Yes, now that I think about it all the client cares about is
> >> that the header has correctly provided the length in bytes. From that
> >> point on, "it's all just data". What I'm still not clear on is how a
> >> client browser "tells" the server that it's _sending_ binary
> >> information and expects it to end up in a file.
> >
> > Usually it doesn't care about the length, but reads until the TCP
> > connection is closed. There was some interest in transferring more
> > than one page (file) on one TCP connection, but mostly that isn't done.
>
> Yes, but how does the server "know" that the incoming data is to be written
> out as a file? How does it get the file name? I thought there was a defined
> protocol for this, but perhaps not.