HTTP package from HTTPd server not sent properly

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

HTTP package from HTTPd server not sent properly

Kjel Snorre Jahrus
Hello,

I am trying to implement a HTTP server with LWIP and I have problems implementing the default given http raw server.

As you can see in the attached wireshark capture, my PC has the IP 192.168.79.23 and the LWIP host *.*.*.247 and after the GET is issued and waits very little and then sends a TCP retransmission.
After that, the host sends a continuation package, followed by a ethernet II frame that contains the HTTP headers and HTML website with no headers as source, destination, etc.
After that it starts a request, re-transmit "dialog".

Can any of you help me with pin pointing the problem so that I can try to fix it?

I attached the lwip driver implementation if that might be helpful. 

Thank you in advance,
Kjel Snorre


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users

httpserver_ethII.pcap (55K) Download Attachment
lwip_driver.c (10K) Download Attachment
lwip_driver.h (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: HTTP package from HTTPd server not sent properly

Kjel Snorre Jahrus
I noticed that the previous package sent via network is a HTTP package with 1460 Bytes size(the same as the next one which is a RAW ethernet frame which contains the actual site data) but with bogus bytes in the beginning and 0s afterwards.

Can you please help me find the reason so that I can try fixing it?

Best regards,
Kjel Snorre

On Fri, Aug 3, 2012 at 2:02 PM, Kjel Snorre Jahrus <[hidden email]> wrote:
Hello,

I am trying to implement a HTTP server with LWIP and I have problems implementing the default given http raw server.

As you can see in the attached wireshark capture, my PC has the IP 192.168.79.23 and the LWIP host *.*.*.247 and after the GET is issued and waits very little and then sends a TCP retransmission.
After that, the host sends a continuation package, followed by a ethernet II frame that contains the HTTP headers and HTML website with no headers as source, destination, etc.
After that it starts a request, re-transmit "dialog".

Can any of you help me with pin pointing the problem so that I can try to fix it?

I attached the lwip driver implementation if that might be helpful. 

Thank you in advance,
Kjel Snorre



_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: HTTP package from HTTPd server not sent properly

Kieran Mansley
On Mon, 2012-08-06 at 13:52 +0200, Kjel Snorre Jahrus wrote:
> I noticed that the previous package sent via network is a HTTP package with
> 1460 Bytes size(the same as the next one which is a RAW ethernet frame
> which contains the actual site data) but with bogus bytes in
> the beginning and 0s afterwards.
>
> Can you please help me find the reason so that I can try fixing it?

My guess is that your driver isn't correctly handling chained buffers
from lwIP.  If lwIP had created a chain of buffers to describe the TCP
segment, and your driver sent each buffer as a separate Ethernet frame
(rather than a single frame) it would I think match what you describe.

Kieran


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: HTTP package from HTTPd server not sent properly

Kjel Snorre Jahrus
Thank you Kieran, 

That solved my problem

Best regards,
Kjel Snorre

On Mon, Aug 6, 2012 at 5:31 PM, Kieran Mansley <[hidden email]> wrote:
On Mon, 2012-08-06 at 13:52 +0200, Kjel Snorre Jahrus wrote:
> I noticed that the previous package sent via network is a HTTP package with
> 1460 Bytes size(the same as the next one which is a RAW ethernet frame
> which contains the actual site data) but with bogus bytes in
> the beginning and 0s afterwards.
>
> Can you please help me find the reason so that I can try fixing it?

My guess is that your driver isn't correctly handling chained buffers
from lwIP.  If lwIP had created a chain of buffers to describe the TCP
segment, and your driver sent each buffer as a separate Ethernet frame
(rather than a single frame) it would I think match what you describe.

Kieran


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users