Requête GET HTTP 1.1 dans un telnet

pascal -  
Nabla's Messages postés 20731 Statut Contributeur -
Bonjour,

Je voudrais exécuter l'URL suivant :
[http://[nom de domaine de mon site web]/GEDCLI/view?action=directopen&name=ENIECT060227623578 [nom de domaine de mon site web]...]
dans un telnet

GEDCLI est un Web Service et c'est du HTTP/1.1

J'ai fait les tentatives ci-dessous, par GET et par mget :

GET :

$ telnet [nom de domaine de mon site web] http
Trying...
Connected to [...]
Escape character is '^]'.
GET /GEDCLI/view?action=directopen&name=ENIECT060227623578 HTTP/1.1

HTTP/1.1 400 Bad Request
Date: Mon, 29 Jun 2009 14:57:28 GMT
Content-Length: 897
Content-Type: text/html
Connection: Close

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN">
<HTML>
<HEAD>
<TITLE>Error 400--Bad Request</TITLE>
<META NAME="GENERATOR" CONTENT="WebLogic Server">
</HEAD>
<BODY bgcolor="white">
<FONT FACE=Helvetica><BR CLEAR=all>
<TABLE border=0 cellspacing=5><TR><TD><BR CLEAR=all>
<FONT FACE="Helvetica" COLOR="black" SIZE="3"><H2>Error 400--Bad Request</H2>
</FONT></TD></TR>
</TABLE>
<TABLE border=0 width=100% cellpadding=10><TR><TD VALIGN=top WIDTH=100% BGCOLOR=
white><FONT FACE="Courier New"><FONT FACE="Helvetica" SIZE="3"><H3>From RFC 2068
<i>Hypertext Transfer Protocol -- HTTP/1.1</i>:</H3>
</FONT><FONT FACE="Helvetica" SIZE="3"><H4>10.4.1 400 Bad Request</H4>
</FONT><P><FONT FACE="Courier New">The request could not be understood by the se
rver due to malformed syntax. The client SHOULD NOT repeat the request without m
odifications.</FONT></P>
</FONT></TD></TR>
</TABLE>

</BODY>
</HTML>
Connection closed.

-> marche pas !

mget :

$ telnet [nom de domaine de mon site web] http
Trying...
Connected to [...] .
Escape character is '^]'.
wget /GEDCLI/view?action=directopen&name=ENIECT060227623578
HTTP/1.0 501 Not Supported

<html><body><h2>Not Supported Method</h2><p> </p></body></html>Connection closed
.

-> non plus (je sais il faut du HTTP 1.1 -> comment le spécifier en argument de mget ou comment utiliser cirl à la place ??)

Pourriez-vous m'aider ??

Merci d'avance,
Pascal

2 réponses

Nabla's Messages postés 20731 Statut Contributeur 3 194
 
salut

sur une resete HTTP1 il faut préciser l'hote:

GET /page.html HTTP/1.0
Host: example.com

https://fr.wikipedia.org/wiki/Hypertext_Transfer_Protocol
1
pascal
 
Chic ça marche !!!
Merci bcp (j'ai passé la journée d'hier tout entière !)
0
Nabla's Messages postés 20731 Statut Contributeur 3 194
 
sur la plupart des serveurs, pas besoin de ca. Mais comme sur une même adrese IP de serveur, il peut y avoir l'hébergement de plusieurs sites, ca explique pourquoi ce champs est devenu obligatoire.
0