Re: http server protocol
- From: "Garrick" <sitongia@xxxxxxxxxxx>
- Date: Sat, 28 Oct 2006 23:50:14 -0700
UPDATE: The terminal was not sending the line-feeds with the carriage
returns. With that turned on and fixed, I send the following text to the
browser, flush the socket and I have to close it in order for the browser to
display, but it then displays everything raw:
HTTP/1.1 200 OKContent-type: text/html
<html><head> <meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>test</title></head><body>test</body></html>
Someone told me that the TCP connection was probably expecting an End of
Data signal, which I don't know how to send.
Garrick
"Garrick" <sitongia@xxxxxxxxxxx> wrote in message
news:J-2dnWIlEL7cR97YnZ2dnUVZ_sGdnZ2d@xxxxxxxxxxxxxxxxxx
This isn't specifically a Linux networking question, but I hope somebody(SocketEthernetIP)(http://www.multitech.com/PRODUCTS/Families/SocketEthernet
will help because this is a device that will be used with Linux.
I am using a ethernet embedded module
IP/port
in raw TCP/IP mode as part of a embedded webserver for a product that will
access the Internet.
The ethernet side of SocketEthernetIP is set it up to have an open TCP
(3000), and is connected to the LAN, 192.168.0.123Inspector
I have Windows Hyperterminal serial terminal connected to the serial port
side of the SocketEthernetIP.
On my client PC, in the webbrowser I contact it http://192.168.0.123:3000
The browser GET command is received by SocketEthernetIP, as it appears in
the output of the serial port which is connected to the serial terminal.
When SocketEthernetIP recieves the HTTP GET request, it assignes a socket
handle which is associated with the socket of the web browser.
Using the serial terminal, I send an HTTP reply to the client web browser,
using the socket handle, the reply:
HTTP/1.1 200 OK
Content-type: text/html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>test</title>
</head>
<body>
test
</body>
</html>
SocketEthernetIP module wraps it into the TCP packet and sends it to my
webbrowser over the LAN, but it the web browser doesn't seem to get it, it
is still waiting for a response. I tried using a packet sniffer IE
which show the sent HTTP actually is being received by the PC, and it isthe
associated with the correct socket destination.
But the web browser doesn't acknowledge it. I tried closing the all TCP
sockets from SocketEthernetIP, but that didn't cause the browser to load
sent HTTP response.
Is there something I am not doing here?
Thanks.
.
- Follow-Ups:
- Re: http server protocol
- From: Garrick
- Re: http server protocol
- References:
- http server protocol
- From: Garrick
- http server protocol
- Prev by Date: getting sshd to work on vector linux
- Next by Date: Re: interface rename ?
- Previous by thread: http server protocol
- Next by thread: Re: http server protocol
- Index(es):
Relevant Pages
|