-> Hier kostenlos registrieren
Hallo,
ich möchte über mein TwinCAT einen HTTP Request (Port 80) an einen Remote Server absetzen.
Dafür verwende ich die TCP/IP Bibliothek TF6310. Der Verbindungsaufbau über FB_ClientServerConnection zum Server funktioniert.
Folgendes HTTP Kommando möchte ich nun an den Server schicken:
Schicke ich den o.g. Befehl über Chrome erhalte ich eine passende Antwort. Im Wireshark-Trace sehe ich, dass er es auch als HTTP Protokoll gesendet hat. Siehe Screenshot OK
Sende ich dieses Kommando über den FB_SocketSend zum Server, so wird es nicht in HTTP "übersetzt". In Wireshark sehe ich, dass er an Port 80 sendet, aber das Payload sieht komplett anders aus. Siehe Screenshot NOK
Laut Beschreibung setzt sich der Befehl wie folgt zusammen:
This section shows an example, how a HTTP request is transmitted without using a web-browser. Lets assume,
that the following HTTP request shall be send:
http://<IP address>/cmd/get_protocol_info
This request is translated into a simple string (using HTTP/1.1 in this example):
GET /cmd/get_protocol_info HTTP/1.1\r\n\r\n
This string is send as payload data of a TCP/IP packet to the server. The server responds back a TCP/IP packet with
the HTTP reply as payload data.
Jemand eine Idee woran es liegt?
Danke und Gruß
R_TRIG
ich möchte über mein TwinCAT einen HTTP Request (Port 80) an einen Remote Server absetzen.
Dafür verwende ich die TCP/IP Bibliothek TF6310. Der Verbindungsaufbau über FB_ClientServerConnection zum Server funktioniert.
Folgendes HTTP Kommando möchte ich nun an den Server schicken:
Schicke ich den o.g. Befehl über Chrome erhalte ich eine passende Antwort. Im Wireshark-Trace sehe ich, dass er es auch als HTTP Protokoll gesendet hat. Siehe Screenshot OK
Sende ich dieses Kommando über den FB_SocketSend zum Server, so wird es nicht in HTTP "übersetzt". In Wireshark sehe ich, dass er an Port 80 sendet, aber das Payload sieht komplett anders aus. Siehe Screenshot NOK
Laut Beschreibung setzt sich der Befehl wie folgt zusammen:
This section shows an example, how a HTTP request is transmitted without using a web-browser. Lets assume,
that the following HTTP request shall be send:
http://<IP address>/cmd/get_protocol_info
This request is translated into a simple string (using HTTP/1.1 in this example):
GET /cmd/get_protocol_info HTTP/1.1\r\n\r\n
This string is send as payload data of a TCP/IP packet to the server. The server responds back a TCP/IP packet with
the HTTP reply as payload data.
Jemand eine Idee woran es liegt?
Danke und Gruß
R_TRIG