HTTP/1.1 request wifi RN-XV

Hi guys,

I try to make a HTTP request on a server from my wifi RN-XV.

The configuration of the server forces us to use a HTTP request 1.1 in order to precise the Host.

Programmatically, I tried this code :

//Command mode
$$$

//connexion to internet
set wlan phrase PasswordNetwork
set wlan ssid NameNetwork
join Network

//Server configuration
set ip proto 18
set dns name myserver.server.com
set ip address 0
set ip remote 80
set com remote 0

open

//Send HTTP request
GET /Service/Server.php HTTP/1.1

My problem is that i can’t precise the Host when the HTTP request is sent. This request is directly done in HTTP/1.0 instead of HTTP/1.1

open

<2.32>
OPENHTTP/1.0

Do you have any idea how I can solve my problem, how i can do an http request in 1.1?

Config :
Arduino 1.0.3
Arduino Uno
Module Wifi RN-XV
Xbee Shield (USB mode)

Thanks a lot!!

You had this working with a HtTP 1.0 request? What was that code?

For virtual/name based hosting you would normally just send a 'HOST: www.yourdomain.com' after your GET string.

Hi,

Thank you for your attention.

Here is how I proceed :
(output of the serial monitor ; in brown are the command I’m entering, in black the output of the arduino. I also precise you the mode of the monitor.)

// > No Line Ending mode
$$$
CMD

// > NL & CR mode
set wlan phrase homeconnect2013

AOK
<2.32>

// > NL & CR mode
set wlan ssid homeconnect

AOK
<2.32>

// > NL & CR mode
join homeconnect

Auto-Assoc homeconnect chan=6 mode=WPA2 SCAN OK
Joining homeconnect now…
<2.32>
Associated!
DHCP: Start
DHCP in 5011ms, lease=3600s
IF=UP
DHCP=ON
IP=192.168.43.219:2000
NM=255.255.255.0
GW=192.168.43.1
Listen on 2000

// > NL & CR mode
set ip proto 18

AOK
<2.32>

// > NL & CR mode
set dns name homeconnect.ece.fr

AOK
<2.32>

// > NL & CR mode
set ip address 0

AOK
<2.32>

// > NL & CR mode
set ip remote 80

AOK
<2.32>

// > NL & CR mode
set com remote 0

AOK
<2.32>

// > NL & CR mode
open

<2.32>
OPEN

// > New Line Mode
GET /Service/Server.php HTTP/1.1

HTTP/1.0 503 Service Unavailable
Cache-Control: no-cache
Connection: close
Content-Type: text/html

ECE Paris
Erreur : Le nom spécifié ne correspond à aucun site web.

GROUPE ECE
Immeuble POLLUX
37 Quai de grenelle, CS 71520
75725 PARIS CEDEX 15
www.ece.fr - webmaster@ece.fr

Tél. : 01 44 39 06 00

Fax : 01 42 22 59 02

*CLOS*

As you can see after opening the connection, the request is sent in HTTP/1.0 even if I precise the 1.1 in the GET request and if I’m in new line mode…

Also it doesn’t let me precise the host, the request is executed directly…

Any idea ? :confused:

That is not strictly how you make a HTTP 1.1 request. It needs to be 3 lines:

  • the get
  • the host
  • the user agent

See http://www.the-art-of-web.com/system/telnet-http11/#.UP1lAJzTkgU for an example.

Good luck!