PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Noms de domaine > comp.protocols.tcp-ip > Upload/Download files to/from HTTP server
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.protocols.tcp-ip TCP and IP network protocols.

Upload/Download files to/from HTTP server

Réponse
 
LinkBack Outils de la discussion
Vieux 23/04/2007, 20h13   #1
Nuno
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Upload/Download files to/from HTTP server

Hello,

I'm trying to implement a c++ client in linux that can upload and
download files from a HTTP server.


Downloading files seem to be easy, i only have to read the bytes that
the HTTP GET command return in the socket, correct. For this mode
(download) i only have one question, for binary files?
this is done in another way or not?


But to upload files i can seem to understand how this is done. I
can't
seem to understand if the HTTP command to be used is the PUT or POST
but neither one do what i require (that is save a file in the server
side). There is anyone that knows how this is done? what parameters
are required for the correct HTTP command (PUT or POST)?


Thanks

  Réponse avec citation
Vieux 24/04/2007, 02h00   #2
Barry Margolin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Upload/Download files to/from HTTP server

In article <1177355630.993187.69240@b58g2000hsg.googlegroups. com>,
Nuno <nuno.esculcas@gmail.com> wrote:

> Hello,
>
> I'm trying to implement a c++ client in linux that can upload and
> download files from a HTTP server.
>
>
> Downloading files seem to be easy, i only have to read the bytes that
> the HTTP GET command return in the socket, correct. For this mode
> (download) i only have one question, for binary files?
> this is done in another way or not?
>
>
> But to upload files i can seem to understand how this is done. I
> can't
> seem to understand if the HTTP command to be used is the PUT or POST
> but neither one do what i require (that is save a file in the server
> side). There is anyone that knows how this is done? what parameters
> are required for the correct HTTP command (PUT or POST)?


PUT is the command for uploading a file directly to a URL, but I suspect
that most servers don't allow this.

POST is for filling in a form, and the file contents will be the value
of a form field that uses <INPUT TYPE=FILE NAME="filename">. See
<http://www.cs.tut.fi/~jkorpela/forms/file.html> for information about
uploading a file in a form.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
  Réponse avec citation
Vieux 24/04/2007, 15h33   #3
Ben_
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Upload/Download files to/from HTTP server

See RFC 1867.

  Réponse avec citation
Vieux 25/04/2007, 09h29   #4
David Schwartz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Upload/Download files to/from HTTP server

On Apr 23, 12:13 pm, Nuno <nuno.escul...@gmail.com> wrote:

> But to upload files i can seem to understand how this is done. I
> can't
> seem to understand if the HTTP command to be used is the PUT or POST
> but neither one do what i require (that is save a file in the server
> side). There is anyone that knows how this is done? what parameters
> are required for the correct HTTP command (PUT or POST)?


There is no "one right way". Check the documentation for the
particular web server you need to upload to.

DS

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 09h44.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10705 seconds with 12 queries