[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] HTTP transfer delayed by errors with Firefox - lwIP 1.3.0 o
From: |
Lou Cypher |
Subject: |
[lwip-users] HTTP transfer delayed by errors with Firefox - lwIP 1.3.0 on Xilinx Microblaze |
Date: |
Wed, 03 Jun 2009 15:43:36 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (Windows/20090302) |
I'm using lwIP on Xilinx (S3A) Microblaze, and I used both their application
note XAPP1026 (heavily modified, since it's quite buggy) and the stock raw httpd
in contrib (with a few changes).
My problem arises when I serve a page with "large" content, like with an image
of some KiB.
The web page is composed by some parts, in this example the main file
"m5.html" has references to
"css/main.css" and
"images/mainlogo.png"
What happens is that after "m5.html" has been loaded, Firefox opens
"images/mainlogo.png", then *during* this data transfer, it requests
"css/main.css".
This behavior seems to confuse lwIP, that "forgets" to complete data transfer
for the CSS file, and that's not all.
After a couple of seconds it calls the tcp_poll() handler, that has not yet data
to send, because the HTTP/"GET css/main.css" request has *not* been delivered to
the tcp_recv() handler.
Trying with IE7, that doesn't seem to use interleaved reads, everything goes
fine, no matter the type/size of files.
Firefox appears to work well when I download single files, that go smooth even
when tens or hundreds of KiB.
Options in lwipopts.h are almost the default ones, beside memory allocation,
that on this board is quite generous.
This is a short log of messages inserted in httpd.c, in functions http_poll() -
the "POLL" message, printed RS-232 when incrementing number of retries - and
http_rcv() - when I recognize file to send and start it.
Numbers in parentheses are file sizes, numbers in brackets is system time in
milliseconds.
-----------------------------------------------------------------------------
httpd: GET /m5.html (383) {31485}
httpd: close conn
httpd: GET /images/mainlogo.png (7728) {31549}
httpd: close conn
httpd: POLL, left: 0, file: 0, data: 0, retr.: 1
loc.: 80, rem.: 3407, state: 4 {33481}
httpd: GET /css/main.css (1300) {34540}
httpd: close conn
-----------------------------------------------------------------------------
The same numbers can be seen on the attached log from Wireshark.
Port 3407 is opened for requesting main.css (in frame 23) but it gets no reply,
then on frame 35 there's a retransmission by client and it finally gets
answered, but it's three seconds later!
- Is there some option I'm missing?
- The function called on tcp_poll() handler works for output *and* input? How to
handle broken/incomplete input with it?
Lou
No. Time Source Destination Protocol Info
1 0.000000 02:30:05:3f:45:17 Broadcast ARP Who
has 192.168.0.131? Tell 192.168.0.130
2 0.000766 Xilinx_00:01:02 02:30:05:3f:45:17 ARP
192.168.0.131 is at 00:0a:35:00:01:02
3 0.000775 192.168.0.130 192.168.0.131 TCP 3403 >
80 [SYN] Seq=0 Win=16384 Len=0 MSS=1460
4 0.001453 192.168.0.131 192.168.0.130 TCP 80 >
3403 [SYN, ACK] Seq=0 Ack=1 Win=6144 Len=0 MSS=1460
5 0.001487 192.168.0.130 192.168.0.131 TCP 3403 >
80 [ACK] Seq=1 Ack=1 Win=17520 Len=0
6 0.001814 192.168.0.130 192.168.0.131 HTTP GET
/m5.html HTTP/1.1
7 0.002638 192.168.0.131 192.168.0.130 TCP 80 >
3403 [ACK] Seq=1 Ack=432 Win=6144 Len=0
8 0.009252 192.168.0.131 192.168.0.130 HTTP
HTTP/1.1 200 OK (text/html)
9 0.063292 192.168.0.130 192.168.0.131 TCP 3403 >
80 [FIN, ACK] Seq=432 Ack=469 Win=17052 Len=0
10 0.064852 192.168.0.131 192.168.0.130 TCP 80 >
3403 [FIN, ACK] Seq=469 Ack=433 Win=6143 Len=0
11 0.064877 192.168.0.130 192.168.0.131 TCP 3403 >
80 [ACK] Seq=433 Ack=470 Win=17052 Len=0
12 0.067697 192.168.0.130 192.168.0.131 TCP 3406 >
80 [SYN] Seq=0 Win=16384 Len=0 MSS=1460
13 0.068432 192.168.0.131 192.168.0.130 TCP 80 >
3406 [SYN, ACK] Seq=0 Ack=1 Win=6144 Len=0 MSS=1460
14 0.068478 192.168.0.130 192.168.0.131 TCP 3406 >
80 [ACK] Seq=1 Ack=1 Win=17520 Len=0
15 0.071566 192.168.0.130 192.168.0.131 HTTP GET
/images/mainlogo.png HTTP/1.1
16 0.072084 192.168.0.130 192.168.0.131 TCP 3407 >
80 [SYN] Seq=0 Win=16384 Len=0 MSS=1460
17 0.072407 192.168.0.131 192.168.0.130 TCP 80 >
3406 [ACK] Seq=1 Ack=427 Win=6144 Len=0
18 0.086365 192.168.0.131 192.168.0.130 TCP [TCP
segment of a reassembled PDU]
19 0.086842 192.168.0.131 192.168.0.130 TCP [TCP
segment of a reassembled PDU]
20 0.086897 192.168.0.130 192.168.0.131 TCP 3406 >
80 [ACK] Seq=427 Ack=1547 Win=17520 Len=0
21 0.087358 192.168.0.131 192.168.0.130 TCP 80 >
3407 [SYN, ACK] Seq=0 Ack=1 Win=6144 Len=0 MSS=1460
22 0.087412 192.168.0.130 192.168.0.131 TCP 3407 >
80 [ACK] Seq=1 Ack=1 Win=17520 Len=0
23 0.088134 192.168.0.130 192.168.0.131 HTTP GET
/css/main.css HTTP/1.1
24 0.089729 192.168.0.131 192.168.0.130 TCP [TCP
segment of a reassembled PDU]
25 0.091644 192.168.0.131 192.168.0.130 TCP [TCP
segment of a reassembled PDU]
26 0.091723 192.168.0.130 192.168.0.131 TCP 3406 >
80 [ACK] Seq=427 Ack=4467 Win=17520 Len=0
27 0.092251 192.168.0.131 192.168.0.130 TCP [TCP
segment of a reassembled PDU]
28 0.093611 192.168.0.131 192.168.0.130 TCP [TCP
segment of a reassembled PDU]
29 0.093693 192.168.0.130 192.168.0.131 TCP 3406 >
80 [ACK] Seq=427 Ack=7387 Win=17520 Len=0
30 0.094252 192.168.0.131 192.168.0.130 HTTP
HTTP/1.1 200 OK (PNG)
31 0.094292 192.168.0.131 192.168.0.130 TCP 80 >
3406 [FIN, ACK] Seq=7815 Ack=427 Win=6144 Len=0
32 0.094313 192.168.0.130 192.168.0.131 TCP 3406 >
80 [ACK] Seq=427 Ack=7816 Win=17092 Len=0
33 0.108413 192.168.0.130 192.168.0.131 TCP 3406 >
80 [FIN, ACK] Seq=427 Ack=7816 Win=17092 Len=0
34 0.109108 192.168.0.131 192.168.0.130 TCP 80 >
3406 [ACK] Seq=7816 Ack=428 Win=6143 Len=0
35 3.101648 192.168.0.130 192.168.0.131 HTTP [TCP
Retransmission] GET /css/main.css HTTP/1.1
36 3.102477 192.168.0.131 192.168.0.130 TCP 80 >
3407 [ACK] Seq=1 Ack=431 Win=6144 Len=0
37 3.111729 192.168.0.131 192.168.0.130 HTTP
HTTP/1.1 200 OK (text/css)
38 3.210211 192.168.0.130 192.168.0.131 TCP 3407 >
80 [FIN, ACK] Seq=431 Ack=1386 Win=16135 Len=0
39 3.211729 192.168.0.131 192.168.0.130 TCP 80 >
3407 [FIN, ACK] Seq=1386 Ack=432 Win=6143 Len=0
40 3.211779 192.168.0.130 192.168.0.131 TCP 3407 >
80 [ACK] Seq=432 Ack=1387 Win=16135 Len=0
____________________________________________________________
Receive Notifications of Incoming Messages
Easily monitor multiple email accounts & access them with a click.
Visit http://www.inbox.com/notifier and check it out!
- [lwip-users] HTTP transfer delayed by errors with Firefox - lwIP 1.3.0 on Xilinx Microblaze,
Lou Cypher <=