[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [BusyBox] Query regarding HTTPD File Uploading
From:       "conn intel" <connintel () gmail ! com>
Date:       2008-03-31 14:58:18
Message-ID: e842129b0803310756n1b5aa67fs7e7f91e77a644659 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks a Lot ..Its amazing.

When I used your script as an executable cgi, I can get the big tar file to
upload in just couple of seconds. Thus got some relief. I am using cgic and
started debugging their code but invain. I even forward my query to them.
According to them cgic is perfectly working, but I guess cgic may be the
bottleneck. Can you please share with us which c to cgi library you are
using.

Thanks for your cooperation,
Ankur.

On Mon, Mar 31, 2008 at 5:10 AM, Denys Vlasenko <vda.linux@googlemail.com>
wrote:

> On Saturday 29 March 2008 15:11, conn intel wrote:
> > Dear Denys Vlasenko,
> >
> > Please find the attached file "FileUpload.raw", packet log using
> wireshark.
> >
> > I have taken log from PC host, and tried to upload a file with name
> > "music.bmp" having size around 18 KB. Its still uploads 4KB with one
> stroke
> > and delays the upload process.
>
> I don't see it happening. Actually, log shows healthy and fast upload
> of entire file. Firefox pushing full-sized (1448 bytes packets)
> they get ack'ed, and entire upload ends successfully in ~0.03 seconds:
>
> 21:10:05.793692 IP 192.168.0.88.51763 > 192.168.0.238.80: S
> 2508189265:2508189265(0) win 5840 <mss 1460,sackOK,timestamp 7886166
> 0,nop,wscale 7>
> 21:10:05.794447 IP 192.168.0.238.80 > 192.168.0.88.51763: S
> 826553832:826553832(0) ack 2508189266 win 5792 <mss 1460,sackOK,timestamp
> 260732 7886166,nop,wscale 7>
> 21:10:05.794477 IP 192.168.0.88.51763 > 192.168.0.238.80: . ack 1 win 46
> <nop,nop,timestamp 7886167 260732>
> 21:10:05.795025 IP 192.168.0.88.51763 > 192.168.0.238.80: P 1:498(497) ack
> 1 win 46 <nop,nop,timestamp 7886167 260732>
> 21:10:05.795088 IP 192.168.0.88.51763 > 192.168.0.238.80: . 498:1946(1448)
> ack 1 win 46 <nop,nop,timestamp 7886167 260732>
> 21:10:05.796880 IP 192.168.0.238.80 > 192.168.0.88.51763: . ack 498 win 54
> <nop,nop,timestamp 260732 7886167>
> 21:10:05.796906 IP 192.168.0.88.51763 > 192.168.0.238.80: .
> 1946:3394(1448) ack 1 win 46 <nop,nop,timestamp 7886168 260732>
> 21:10:05.797043 IP 192.168.0.88.51763 > 192.168.0.238.80: .
> 3394:4842(1448) ack 1 win 46 <nop,nop,timestamp 7886168 260732>
> 21:10:05.798389 IP 192.168.0.238.80 > 192.168.0.88.51763: . ack 1946 win
> 77 <nop,nop,timestamp 260732 7886167>
> 21:10:05.798459 IP 192.168.0.88.51763 > 192.168.0.238.80: .
> 4842:6290(1448) ack 1 win 46 <nop,nop,timestamp 7886168 260732>
> 21:10:05.798599 IP 192.168.0.88.51763 > 192.168.0.238.80: P
> 6290:7738(1448) ack 1 win 46 <nop,nop,timestamp 7886168 260732>
> 21:10:05.799760 IP 192.168.0.238.80 > 192.168.0.88.51763: . ack 3394 win
> 99 <nop,nop,timestamp 260732 7886168>
> 21:10:05.799835 IP 192.168.0.88.51763 > 192.168.0.238.80: .
> 7738:9186(1448) ack 1 win 46 <nop,nop,timestamp 7886168 260732>
> 21:10:05.799977 IP 192.168.0.88.51763 > 192.168.0.238.80: .
> 9186:10634(1448) ack 1 win 46 <nop,nop,timestamp 7886168 260732>
> 21:10:05.804889 IP 192.168.0.238.80 > 192.168.0.88.51763: . ack 4842 win
> 122 <nop,nop,timestamp 260732 7886168>
> 21:10:05.804938 IP 192.168.0.88.51763 > 192.168.0.238.80: P
> 10634:12082(1448) ack 1 win 46 <nop,nop,timestamp 7886170 260732>
> 21:10:05.804957 IP 192.168.0.238.80 > 192.168.0.88.51763: . ack 6290 win
> 145 <nop,nop,timestamp 260732 7886168>
> 21:10:05.805028 IP 192.168.0.238.80 > 192.168.0.88.51763: . ack 7738 win
> 167 <nop,nop,timestamp 260733 7886168>
> 21:10:05.805100 IP 192.168.0.238.80 > 192.168.0.88.51763: . ack 9186 win
> 190 <nop,nop,timestamp 260733 7886168>
> 21:10:05.805124 IP 192.168.0.88.51763 > 192.168.0.238.80: .
> 12082:13530(1448) ack 1 win 46 <nop,nop,timestamp 7886170 260733>
> 21:10:05.805262 IP 192.168.0.88.51763 > 192.168.0.238.80: .
> 13530:14978(1448) ack 1 win 46 <nop,nop,timestamp 7886170 260733>
> 21:10:05.805400 IP 192.168.0.88.51763 > 192.168.0.238.80: P
> 14978:16178(1200) ack 1 win 46 <nop,nop,timestamp 7886170 260733>
> 21:10:05.805518 IP 192.168.0.88.51763 > 192.168.0.238.80: .
> 16178:17626(1448) ack 1 win 46 <nop,nop,timestamp 7886170 260733>
> 21:10:05.806437 IP 192.168.0.238.80 > 192.168.0.88.51763: . ack 10634 win
> 207 <nop,nop,timestamp 260733 7886168>
> 21:10:05.806456 IP 192.168.0.88.51763 > 192.168.0.238.80: .
> 17626:19074(1448) ack 1 win 46 <nop,nop,timestamp 7886170 260733>
> 21:10:05.807846 IP 192.168.0.238.80 > 192.168.0.88.51763: . ack 12082 win
> 197 <nop,nop,timestamp 260733 7886170>
> 21:10:05.810243 IP 192.168.0.238.80 > 192.168.0.88.51763: . ack 13530 win
> 187 <nop,nop,timestamp 260733 7886170>
> 21:10:05.810386 IP 192.168.0.238.80 > 192.168.0.88.51763: . ack 14978 win
> 177 <nop,nop,timestamp 260733 7886170>
> 21:10:05.811934 IP 192.168.0.238.80 > 192.168.0.88.51763: . ack 16178 win
> 169 <nop,nop,timestamp 260733 7886170>
> 21:10:05.811967 IP 192.168.0.88.51763 > 192.168.0.238.80: P
> 19074:19454(380) ack 1 win 46 <nop,nop,timestamp 7886171 260733>
> 21:10:05.819985 IP 192.168.0.238.80 > 192.168.0.88.51763: . ack 19454 win
> 175 <nop,nop,timestamp 260734 7886170>
>
> I will show last two packets in full below.
>
> 21:10:05.811967 IP 192.168.0.88.51763 > 192.168.0.238.80: P
> 19074:19454(380) ack 1 win 46 <nop,nop,timestamp 7886171 260733>
>        0x0000:  4500 01b0 bb17 4000 4006 fb99 c0a8 0058  E.....@.@......X
>        0x0010:  c0a8 00ee ca33 0050 9580 38d3 3144 35e9  .....3.P..8.1D5.
> ....
>        0x0190:  3134 3433 3439 3139 3936 3933 3133 3139  1443491996931319
>        0x01a0:  3638 3531 3537 3630 3831 3135 2d2d 0d0a  685157608115--..
> 21:10:05.819985 IP 192.168.0.238.80 > 192.168.0.88.51763: . ack 19454 win
> 175 <nop,nop,timestamp 260734 7886170>
>        0x0000:  4500 0034 cfa1 4000 4006 e88b c0a8 00ee  E..4..@.@.......
>        0x0010:  c0a8 0058 0050 ca33 3144 35e9 9580 3a4f  ...X.P.31D5...:O
>        0x0020:  8010 00af a1a2 0000 0101 080a 0003 fa7e  ...............~
>        0x0030:  0078 555a                                .xUZ
>
> What follows is a bit strange: server says "200 OK":
>
> 21:10:09.519821 IP 192.168.0.238.80 > 192.168.0.88.51763: P 1:18(17) ack
> 19454 win 212 <nop,nop,timestamp 261105 7886170>
>        0x0000:  4500 0045 cfa2 4000 4006 e879 c0a8 00ee  E..E..@.@..y....
>        0x0010:  c0a8 0058 0050 ca33 3144 35e9 9580 3a4f  ...X.P.31D5...:O
>        0x0020:  8018 00d4 e02c 0000 0101 080a 0003 fbf1  .....,..........
>        0x0030:  0078 555a 4854 5450 2f31 2e30 2032 3030  .xUZHTTP/1.0.200
>        0x0040:  204f 4b0d 0a                             .OK..
> 21:10:09.519852 IP 192.168.0.88.51763 > 192.168.0.238.80: . ack 18 win 46
> <nop,nop,timestamp 7887099 261105>
>
> and they it sends a page which complains about file NOT being sent!
>
> 21:10:09.521032 IP 192.168.0.238.80 > 192.168.0.88.51763: P 18:747(729)
> ack 19454 win 212 <nop,nop,timestamp 261105 7887099>
>        0x0000:  4500 030d cfa3 4000 4006 e5b0 c0a8 00ee  E.....@.@.......
>        0x0010:  c0a8 0058 0050 ca33 3144 35fa 9580 3a4f  ...X.P.31D5...:O
>        0x0020:  8018 00d4 4646 0000 0101 080a 0003 fbf1  ....FF..........
>        0x0030:  0078 58fb 436f 6e74 656e 742d 7479 7065  .xX.Content-type
>        0x0040:  3a20 7465 7874 2f68 746d 6c0d 0a0d 0a3c  :.text/html....<
>        0x0050:  4854 4d4c 3e3c 4845 4144 3e0a 3c54 4954  HTML><HEAD>.<TIT
>        0x0060:  4c45 3e63 6769 6320 7465 7374 3c2f 5449  LE>cgic.test</TI
>        0x0070:  544c 453e 3c2f 4845 4144 3e0a 3c42 4f44  TLE></HEAD>.<BOD
>        0x0080:  593e 3c48 313e 6367 6963 2074 6573 743c  Y><H1>cgic.test<
>        0x0090:  2f48 313e 0a3c 6872 3e0a 3c21 2d2d 2032  /H1>.<hr>.<!--.2
>        0x00a0:  2e30 3a20 6d75 6c74 6970 6172 742f 666f  .0:.multipart/fo
>        0x00b0:  726d 2d64 6174 6120 6973 2072 6571 7569  rm-data.is.requi
>        0x00c0:  7265 6420 666f 7220 6669 6c65 2075 706c  red.for.file.upl
>        0x00d0:  6f61 6473 2e20 2d2d 3e3c 666f 726d 206d  oads..--><form.m
>        0x00e0:  6574 686f 643d 2250 4f53 5422 2065 6e63  ethod="POST".enc
>        0x00f0:  7479 7065 3d22 6d75 6c74 6970 6172 742f  type="multipart/
>        0x0100:  666f 726d 2d64 6174 6122 2009 6163 7469  form-data"..acti
>        0x0110:  6f6e 3d22 2f63 6769 2d62 696e 2f63 6769  on="/cgi-bin/cgi
>        0x0120:  6374 6573 742e 6367 6922 3e0a 3c70 3e46  ctest.cgi">.<p>F
>        0x0130:  696c 6520 5570 6c6f 6164 3a0a 3c69 6e70  ile.Upload:.<inp
>        0x0140:  7574 2074 7970 653d 2266 696c 6522 206e  ut.type="file".n
>        0x0150:  616d 653d 2266 696c 6522 2076 616c 7565  ame="file".value
>        0x0160:  3d22 223e 2028 5365 6c65 6374 2041 204c  ="">.(Select.A.L
>        0x0170:  6f63 616c 2046 696c 6529 0a3c 703e 0a3c  ocal.File).<p>.<
>        0x0180:  696e 7075 7420 7479 7065 3d22 7375 626d  input.type="subm
>        0x0190:  6974 2220 6e61 6d65 3d22 7465 7374 6367  it".name="testcg
>        0x01a0:  6963 2220 7661 6c75 653d 2253 7562 6d69  ic".value="Submi
>        0x01b0:  7420 5265 7175 6573 7422 3e0a 3c69 6e70  t.Request">.<inp
>        0x01c0:  7574 2074 7970 653d 2272 6573 6574 2220  ut.type="reset".
>        0x01d0:  7661 6c75 653d 2252 6573 6574 2052 6571  value="Reset.Req
>        0x01e0:  7565 7374 223e 0a3c 703e 5361 7665 2074  uest">.<p>Save.t
>        0x01f0:  6865 2043 4749 2045 6e76 6972 6f6e 6d65  he.CGI.Environme
>        0x0200:  6e74 3c70 3e0a 5072 6573 7369 6e67 2074  nt<p>.Pressing.t
>        0x0210:  6869 7320 6275 7474 6f6e 2077 696c 6c20  his.button.will.
>        0x0220:  7375 626d 6974 2074 6865 2066 6f72 6d2c  submit.the.form,
>        0x0230:  2074 6865 6e20 7361 7665 2074 6865 2043  .then.save.the.C
>        0x0240:  4749 2065 6e76 6972 6f6e 6d65 6e74 2073  GI.environment.s
>        0x0250:  6f20 7468 6174 2069 7420 6361 6e20 6265  o.that.it.can.be
>        0x0260:  2072 6570 6c61 7965 6420 6c61 7465 7220  .replayed.later.
>        0x0270:  6279 2063 616c 6c69 6e67 2063 6769 5265  by.calling.cgiRe
>        0x0280:  6164 456e 7669 726f 6e6d 656e 7420 2869  adEnvironment.(i
>        0x0290:  6e20 6120 6465 6275 6767 6572 2c20 666f  n.a.debugger,.fo
>        0x02a0:  7220 696e 7374 616e 6365 292e 3c70 3e0a  r.instance).<p>.
>        0x02b0:  3c69 6e70 7574 2074 7970 653d 2273 7562  <input.type="sub
>        0x02c0:  6d69 7422 206e 616d 653d 2273 6176 6565  mit".name="savee
>        0x02d0:  6e76 6972 6f6e 6d65 6e74 2220 7661 6c75  nvironment".valu
>        0x02e0:  653d 2253 6176 6520 456e 7669 726f 6e6d  e="Save.Environm
>        0x02f0:  656e 7422 3e0a 3c2f 666f 726d 3e0a 3c2f  ent">.</form>.</
>        0x0300:  424f 4459 3e3c 2f48 544d 4c3e 0a         BODY></HTML>.
> 21:10:09.521041 IP 192.168.0.88.51763 > 192.168.0.238.80: . ack 747 win 58
> <nop,nop,timestamp 7887099 261105>
>
> Then connection is closed normally:
>
> 21:10:09.521731 IP 192.168.0.238.80 > 192.168.0.88.51763: F 747:747(0) ack
> 19454 win 212 <nop,nop,timestamp 261105 7887099>
> 21:10:09.521833 IP 192.168.0.88.51763 > 192.168.0.238.80: F 19454:19454(0)
> ack 748 win 58 <nop,nop,timestamp 7887099 261105>
> 21:10:09.522298 IP 192.168.0.238.80 > 192.168.0.88.51763: . ack 19455 win
> 212 <nop,nop,timestamp 261105 7887099>
>
> I can only conclude that server-side CGI script was unable
> to properly parse uploaded file's data.
>
> > Also can you please elaborate more on following. how can I use it and
> where
> > ?
> > "#!/bin/sh
> > printf '\r\n'
> > cat >/tmp/POSTDATA "
>
> Put this into /cgi-bin/fwupgrade.cgi file (relative to httpd's top
> directory):
>
> #!/bin/sh
> printf '\r\n'
> cat >/tmp/POSTDATA
>
> make it executable, and use it as simplest CGI for saving unprocessed
> POST uploads. For example, user can initiate uploads from this
> simple page:
>
> test_upload.htm
> ===============
> <html><body>
> <form action="/cgi-bin/fwupgrade.cgi" enctype="multipart/form-data"
> method="post">
> <p>Please specify a file:
> <p><input type="file" name="datafile" size="40">
> <p><input type="submit" value="Send">
> </form>
>
> --
> vda
>

[Attachment #5 (text/html)]

Thanks a Lot ..Its amazing.<br><br>When I used your script as an executable cgi, I \
can get the big tar file to upload in just couple of seconds. Thus got some relief. I \
am using cgic and started debugging their code but invain. I even forward my query to \
them. According to them cgic is perfectly working, but I guess cgic may be the \
bottleneck. Can you please share with us which c to cgi library you are using.<br> \
<br>Thanks for your cooperation,<br>Ankur.<br><br><div class="gmail_quote">On Mon, \
Mar 31, 2008 at 5:10 AM, Denys Vlasenko &lt;<a \
href="mailto:vda.linux@googlemail.com">vda.linux@googlemail.com</a>&gt; \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div class="Ih2E3d">On Saturday \
29 March 2008 15:11, conn intel wrote:<br> &gt; Dear Denys Vlasenko,<br>
&gt;<br>
&gt; Please find the attached file &quot;FileUpload.raw&quot;, packet log using \
wireshark.<br> &gt;<br>
&gt; I have taken log from PC host, and tried to upload a file with name<br>
&gt; &quot;music.bmp&quot; having size around 18 KB. Its still uploads 4KB with one \
stroke<br> &gt; and delays the upload process.<br>
<br>
</div>I don&#39;t see it happening. Actually, log shows healthy and fast upload<br>
of entire file. Firefox pushing full-sized (1448 bytes packets)<br>
they get ack&#39;ed, and entire upload ends successfully in ~0.03 seconds:<br>
<br>
21:10:05.793692 IP 192.168.0.88.51763 &gt; 192.168.0.238.80: S \
2508189265:2508189265(0) win 5840 &lt;mss 1460,sackOK,timestamp 7886166 0,nop,wscale \
7&gt;<br> 21:10:05.794447 IP 192.168.0.238.80 &gt; 192.168.0.88.51763: S \
826553832:826553832(0) ack 2508189266 win 5792 &lt;mss 1460,sackOK,timestamp 260732 \
7886166,nop,wscale 7&gt;<br> 21:10:05.794477 IP 192.168.0.88.51763 &gt; \
192.168.0.238.80: . ack 1 win 46 &lt;nop,nop,timestamp 7886167 260732&gt;<br> \
21:10:05.795025 IP 192.168.0.88.51763 &gt; 192.168.0.238.80: P 1:498(497) ack 1 win \
46 &lt;nop,nop,timestamp 7886167 260732&gt;<br> 21:10:05.795088 IP 192.168.0.88.51763 \
&gt; 192.168.0.238.80: . 498:1946(1448) ack 1 win 46 &lt;nop,nop,timestamp 7886167 \
260732&gt;<br> 21:10:05.796880 IP 192.168.0.238.80 &gt; 192.168.0.88.51763: . ack 498 \
win 54 &lt;nop,nop,timestamp 260732 7886167&gt;<br> 21:10:05.796906 IP \
192.168.0.88.51763 &gt; 192.168.0.238.80: . 1946:3394(1448) ack 1 win 46 \
&lt;nop,nop,timestamp 7886168 260732&gt;<br> 21:10:05.797043 IP 192.168.0.88.51763 \
&gt; 192.168.0.238.80: . 3394:4842(1448) ack 1 win 46 &lt;nop,nop,timestamp 7886168 \
260732&gt;<br> 21:10:05.798389 IP 192.168.0.238.80 &gt; 192.168.0.88.51763: . ack \
1946 win 77 &lt;nop,nop,timestamp 260732 7886167&gt;<br> 21:10:05.798459 IP \
192.168.0.88.51763 &gt; 192.168.0.238.80: . 4842:6290(1448) ack 1 win 46 \
&lt;nop,nop,timestamp 7886168 260732&gt;<br> 21:10:05.798599 IP 192.168.0.88.51763 \
&gt; 192.168.0.238.80: P 6290:7738(1448) ack 1 win 46 &lt;nop,nop,timestamp 7886168 \
260732&gt;<br> 21:10:05.799760 IP 192.168.0.238.80 &gt; 192.168.0.88.51763: . ack \
3394 win 99 &lt;nop,nop,timestamp 260732 7886168&gt;<br> 21:10:05.799835 IP \
192.168.0.88.51763 &gt; 192.168.0.238.80: . 7738:9186(1448) ack 1 win 46 \
&lt;nop,nop,timestamp 7886168 260732&gt;<br> 21:10:05.799977 IP 192.168.0.88.51763 \
&gt; 192.168.0.238.80: . 9186:10634(1448) ack 1 win 46 &lt;nop,nop,timestamp 7886168 \
260732&gt;<br> 21:10:05.804889 IP 192.168.0.238.80 &gt; 192.168.0.88.51763: . ack \
4842 win 122 &lt;nop,nop,timestamp 260732 7886168&gt;<br> 21:10:05.804938 IP \
192.168.0.88.51763 &gt; 192.168.0.238.80: P 10634:12082(1448) ack 1 win 46 \
&lt;nop,nop,timestamp 7886170 260732&gt;<br> 21:10:05.804957 IP 192.168.0.238.80 &gt; \
192.168.0.88.51763: . ack 6290 win 145 &lt;nop,nop,timestamp 260732 7886168&gt;<br> \
21:10:05.805028 IP 192.168.0.238.80 &gt; 192.168.0.88.51763: . ack 7738 win 167 \
&lt;nop,nop,timestamp 260733 7886168&gt;<br> 21:10:05.805100 IP 192.168.0.238.80 &gt; \
192.168.0.88.51763: . ack 9186 win 190 &lt;nop,nop,timestamp 260733 7886168&gt;<br> \
21:10:05.805124 IP 192.168.0.88.51763 &gt; 192.168.0.238.80: . 12082:13530(1448) ack \
1 win 46 &lt;nop,nop,timestamp 7886170 260733&gt;<br> 21:10:05.805262 IP \
192.168.0.88.51763 &gt; 192.168.0.238.80: . 13530:14978(1448) ack 1 win 46 \
&lt;nop,nop,timestamp 7886170 260733&gt;<br> 21:10:05.805400 IP 192.168.0.88.51763 \
&gt; 192.168.0.238.80: P 14978:16178(1200) ack 1 win 46 &lt;nop,nop,timestamp 7886170 \
260733&gt;<br> 21:10:05.805518 IP 192.168.0.88.51763 &gt; 192.168.0.238.80: . \
16178:17626(1448) ack 1 win 46 &lt;nop,nop,timestamp 7886170 260733&gt;<br> \
21:10:05.806437 IP 192.168.0.238.80 &gt; 192.168.0.88.51763: . ack 10634 win 207 \
&lt;nop,nop,timestamp 260733 7886168&gt;<br> 21:10:05.806456 IP 192.168.0.88.51763 \
&gt; 192.168.0.238.80: . 17626:19074(1448) ack 1 win 46 &lt;nop,nop,timestamp 7886170 \
260733&gt;<br> 21:10:05.807846 IP 192.168.0.238.80 &gt; 192.168.0.88.51763: . ack \
12082 win 197 &lt;nop,nop,timestamp 260733 7886170&gt;<br> 21:10:05.810243 IP \
192.168.0.238.80 &gt; 192.168.0.88.51763: . ack 13530 win 187 &lt;nop,nop,timestamp \
260733 7886170&gt;<br> 21:10:05.810386 IP 192.168.0.238.80 &gt; 192.168.0.88.51763: . \
ack 14978 win 177 &lt;nop,nop,timestamp 260733 7886170&gt;<br> 21:10:05.811934 IP \
192.168.0.238.80 &gt; 192.168.0.88.51763: . ack 16178 win 169 &lt;nop,nop,timestamp \
260733 7886170&gt;<br> 21:10:05.811967 IP 192.168.0.88.51763 &gt; 192.168.0.238.80: P \
19074:19454(380) ack 1 win 46 &lt;nop,nop,timestamp 7886171 260733&gt;<br> \
21:10:05.819985 IP 192.168.0.238.80 &gt; 192.168.0.88.51763: . ack 19454 win 175 \
&lt;nop,nop,timestamp 260734 7886170&gt;<br> <br>
I will show last two packets in full below.<br>
<br>
21:10:05.811967 IP 192.168.0.88.51763 &gt; 192.168.0.238.80: P 19074:19454(380) ack 1 \
win 46 &lt;nop,nop,timestamp 7886171 260733&gt;<br>  &nbsp; &nbsp; &nbsp; \
&nbsp;0x0000: &nbsp;4500 01b0 bb17 4000 4006 fb99 c0a8 0058 \
&nbsp;E.....@.@......X<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0010: &nbsp;c0a8 00ee ca33 \
                0050 9580 38d3 3144 35e9 &nbsp;.....3.P..8.1D5.<br>
....<br>
 &nbsp; &nbsp; &nbsp; &nbsp;0x0190: &nbsp;3134 3433 3439 3139 3936 3933 3133 3139 \
&nbsp;1443491996931319<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x01a0: &nbsp;3638 3531 3537 \
3630 3831 3135 2d2d 0d0a &nbsp;685157608115--..<br> 21:10:05.819985 IP \
192.168.0.238.80 &gt; 192.168.0.88.51763: . ack 19454 win 175 &lt;nop,nop,timestamp \
260734 7886170&gt;<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0000: &nbsp;4500 0034 cfa1 4000 \
4006 e88b c0a8 00ee &nbsp;E..4..@.@.......<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0010: \
&nbsp;c0a8 0058 0050 ca33 3144 35e9 9580 3a4f &nbsp;...X.P.31D5...:O<br>  &nbsp; \
&nbsp; &nbsp; &nbsp;0x0020: &nbsp;8010 00af a1a2 0000 0101 080a 0003 fa7e \
&nbsp;...............~<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0030: &nbsp;0078 555a &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp;.xUZ<br> <br>
What follows is a bit strange: server says &quot;200 OK&quot;:<br>
<br>
21:10:09.519821 IP 192.168.0.238.80 &gt; 192.168.0.88.51763: P 1:18(17) ack 19454 win \
212 &lt;nop,nop,timestamp 261105 7886170&gt;<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0000: \
&nbsp;4500 0045 cfa2 4000 4006 e879 c0a8 00ee &nbsp;E..E..@.@..y....<br>  &nbsp; \
&nbsp; &nbsp; &nbsp;0x0010: &nbsp;c0a8 0058 0050 ca33 3144 35e9 9580 3a4f \
&nbsp;...X.P.31D5...:O<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0020: &nbsp;8018 00d4 e02c \
0000 0101 080a 0003 fbf1 &nbsp;.....,..........<br>  &nbsp; &nbsp; &nbsp; \
&nbsp;0x0030: &nbsp;0078 555a 4854 5450 2f31 2e30 2032 3030 \
&nbsp;.xUZHTTP/1.0.200<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0040: &nbsp;204f 4b0d 0a \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; .OK..<br> 21:10:09.519852 IP 192.168.0.88.51763 &gt; 192.168.0.238.80: \
. ack 18 win 46 &lt;nop,nop,timestamp 7887099 261105&gt;<br> <br>
and they it sends a page which complains about file NOT being sent!<br>
<br>
21:10:09.521032 IP 192.168.0.238.80 &gt; 192.168.0.88.51763: P 18:747(729) ack 19454 \
win 212 &lt;nop,nop,timestamp 261105 7887099&gt;<br>  &nbsp; &nbsp; &nbsp; \
&nbsp;0x0000: &nbsp;4500 030d cfa3 4000 4006 e5b0 c0a8 00ee \
&nbsp;E.....@.@.......<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0010: &nbsp;c0a8 0058 0050 \
ca33 3144 35fa 9580 3a4f &nbsp;...X.P.31D5...:O<br>  &nbsp; &nbsp; &nbsp; \
&nbsp;0x0020: &nbsp;8018 00d4 4646 0000 0101 080a 0003 fbf1 \
&nbsp;....FF..........<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0030: &nbsp;0078 58fb 436f \
6e74 656e 742d 7479 7065 &nbsp;.xX.Content-type<br>  &nbsp; &nbsp; &nbsp; \
&nbsp;0x0040: &nbsp;3a20 7465 7874 2f68 746d 6c0d 0a0d 0a3c \
&nbsp;:.text/html....&lt;<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0050: &nbsp;4854 4d4c \
3e3c 4845 4144 3e0a 3c54 4954 &nbsp;HTML&gt;&lt;HEAD&gt;.&lt;TIT<br>  &nbsp; &nbsp; \
&nbsp; &nbsp;0x0060: &nbsp;4c45 3e63 6769 6320 7465 7374 3c2f 5449 \
&nbsp;LE&gt;cgic.test&lt;/TI<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0070: &nbsp;544c 453e \
3c2f 4845 4144 3e0a 3c42 4f44 &nbsp;TLE&gt;&lt;/HEAD&gt;.&lt;BOD<br>  &nbsp; &nbsp; \
&nbsp; &nbsp;0x0080: &nbsp;593e 3c48 313e 6367 6963 2074 6573 743c \
&nbsp;Y&gt;&lt;H1&gt;cgic.test&lt;<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0090: &nbsp;2f48 \
313e 0a3c 6872 3e0a 3c21 2d2d 2032 &nbsp;/H1&gt;.&lt;hr&gt;.&lt;!--.2<br>  &nbsp; \
&nbsp; &nbsp; &nbsp;0x00a0: &nbsp;2e30 3a20 6d75 6c74 6970 6172 742f 666f \
&nbsp;.0:.multipart/fo<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x00b0: &nbsp;726d 2d64 6174 \
6120 6973 2072 6571 7569 &nbsp;rm-data.is.requi<br>  &nbsp; &nbsp; &nbsp; \
&nbsp;0x00c0: &nbsp;7265 6420 666f 7220 6669 6c65 2075 706c \
&nbsp;red.for.file.upl<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x00d0: &nbsp;6f61 6473 2e20 \
2d2d 3e3c 666f 726d 206d &nbsp;oads..--&gt;&lt;form.m<br>  &nbsp; &nbsp; &nbsp; \
&nbsp;0x00e0: &nbsp;6574 686f 643d 2250 4f53 5422 2065 6e63 \
&nbsp;ethod=&quot;POST&quot;.enc<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x00f0: &nbsp;7479 \
7065 3d22 6d75 6c74 6970 6172 742f &nbsp;type=&quot;multipart/<br>  &nbsp; &nbsp; \
&nbsp; &nbsp;0x0100: &nbsp;666f 726d 2d64 6174 6122 2009 6163 7469 \
&nbsp;form-data&quot;..acti<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0110: &nbsp;6f6e 3d22 \
2f63 6769 2d62 696e 2f63 6769 &nbsp;on=&quot;/cgi-bin/cgi<br>  &nbsp; &nbsp; &nbsp; \
&nbsp;0x0120: &nbsp;6374 6573 742e 6367 6922 3e0a 3c70 3e46 \
&nbsp;ctest.cgi&quot;&gt;.&lt;p&gt;F<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0130: \
&nbsp;696c 6520 5570 6c6f 6164 3a0a 3c69 6e70 &nbsp;ile.Upload:.&lt;inp<br>  &nbsp; \
&nbsp; &nbsp; &nbsp;0x0140: &nbsp;7574 2074 7970 653d 2266 696c 6522 206e \
&nbsp;ut.type=&quot;file&quot;.n<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0150: &nbsp;616d \
653d 2266 696c 6522 2076 616c 7565 &nbsp;ame=&quot;file&quot;.value<br>  &nbsp; \
&nbsp; &nbsp; &nbsp;0x0160: &nbsp;3d22 223e 2028 5365 6c65 6374 2041 204c \
&nbsp;=&quot;&quot;&gt;.(Select.A.L<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0170: \
&nbsp;6f63 616c 2046 696c 6529 0a3c 703e 0a3c &nbsp;ocal.File).&lt;p&gt;.&lt;<br>  \
&nbsp; &nbsp; &nbsp; &nbsp;0x0180: &nbsp;696e 7075 7420 7479 7065 3d22 7375 626d \
&nbsp;input.type=&quot;subm<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0190: &nbsp;6974 2220 \
6e61 6d65 3d22 7465 7374 6367 &nbsp;it&quot;.name=&quot;testcg<br>  &nbsp; &nbsp; \
&nbsp; &nbsp;0x01a0: &nbsp;6963 2220 7661 6c75 653d 2253 7562 6d69 \
&nbsp;ic&quot;.value=&quot;Submi<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x01b0: &nbsp;7420 \
5265 7175 6573 7422 3e0a 3c69 6e70 &nbsp;t.Request&quot;&gt;.&lt;inp<br>  &nbsp; \
&nbsp; &nbsp; &nbsp;0x01c0: &nbsp;7574 2074 7970 653d 2272 6573 6574 2220 \
&nbsp;ut.type=&quot;reset&quot;.<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x01d0: &nbsp;7661 \
6c75 653d 2252 6573 6574 2052 6571 &nbsp;value=&quot;Reset.Req<br>  &nbsp; &nbsp; \
&nbsp; &nbsp;0x01e0: &nbsp;7565 7374 223e 0a3c 703e 5361 7665 2074 \
&nbsp;uest&quot;&gt;.&lt;p&gt;Save.t<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x01f0: \
&nbsp;6865 2043 4749 2045 6e76 6972 6f6e 6d65 &nbsp;he.CGI.Environme<br>  &nbsp; \
&nbsp; &nbsp; &nbsp;0x0200: &nbsp;6e74 3c70 3e0a 5072 6573 7369 6e67 2074 \
&nbsp;nt&lt;p&gt;.Pressing.t<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0210: &nbsp;6869 7320 \
6275 7474 6f6e 2077 696c 6c20 &nbsp;his.button.will.<br>  &nbsp; &nbsp; &nbsp; \
&nbsp;0x0220: &nbsp;7375 626d 6974 2074 6865 2066 6f72 6d2c \
&nbsp;submit.the.form,<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0230: &nbsp;2074 6865 6e20 \
7361 7665 2074 6865 2043 &nbsp;.then.save.the.C<br>  &nbsp; &nbsp; &nbsp; \
&nbsp;0x0240: &nbsp;4749 2065 6e76 6972 6f6e 6d65 6e74 2073 \
&nbsp;GI.environment.s<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0250: &nbsp;6f20 7468 6174 \
2069 7420 6361 6e20 6265 &nbsp;<a href="http://o.that.it.can.be" \
target="_blank">o.that.it.can.be</a><br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0260: \
&nbsp;2072 6570 6c61 7965 6420 6c61 7465 7220 &nbsp;.replayed.later.<br>  &nbsp; \
&nbsp; &nbsp; &nbsp;0x0270: &nbsp;6279 2063 616c 6c69 6e67 2063 6769 5265 \
&nbsp;by.calling.cgiRe<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0280: &nbsp;6164 456e 7669 \
726f 6e6d 656e 7420 2869 &nbsp;adEnvironment.(i<br>  &nbsp; &nbsp; &nbsp; \
&nbsp;0x0290: &nbsp;6e20 6120 6465 6275 6767 6572 2c20 666f \
&nbsp;n.a.debugger,.fo<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x02a0: &nbsp;7220 696e 7374 \
616e 6365 292e 3c70 3e0a &nbsp;r.instance).&lt;p&gt;.<br>  &nbsp; &nbsp; &nbsp; \
&nbsp;0x02b0: &nbsp;3c69 6e70 7574 2074 7970 653d 2273 7562 \
&nbsp;&lt;input.type=&quot;sub<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x02c0: &nbsp;6d69 \
7422 206e 616d 653d 2273 6176 6565 &nbsp;mit&quot;.name=&quot;savee<br>  &nbsp; \
&nbsp; &nbsp; &nbsp;0x02d0: &nbsp;6e76 6972 6f6e 6d65 6e74 2220 7661 6c75 \
&nbsp;nvironment&quot;.valu<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x02e0: &nbsp;653d 2253 \
6176 6520 456e 7669 726f 6e6d &nbsp;e=&quot;Save.Environm<br>  &nbsp; &nbsp; &nbsp; \
&nbsp;0x02f0: &nbsp;656e 7422 3e0a 3c2f 666f 726d 3e0a 3c2f \
&nbsp;ent&quot;&gt;.&lt;/form&gt;.&lt;/<br>  &nbsp; &nbsp; &nbsp; &nbsp;0x0300: \
&nbsp;424f 4459 3e3c 2f48 544d 4c3e 0a &nbsp; &nbsp; &nbsp; &nbsp; \
BODY&gt;&lt;/HTML&gt;.<br> 21:10:09.521041 IP 192.168.0.88.51763 &gt; \
192.168.0.238.80: . ack 747 win 58 &lt;nop,nop,timestamp 7887099 261105&gt;<br> <br>
Then connection is closed normally:<br>
<br>
21:10:09.521731 IP 192.168.0.238.80 &gt; 192.168.0.88.51763: F 747:747(0) ack 19454 \
win 212 &lt;nop,nop,timestamp 261105 7887099&gt;<br> 21:10:09.521833 IP \
192.168.0.88.51763 &gt; 192.168.0.238.80: F 19454:19454(0) ack 748 win 58 \
&lt;nop,nop,timestamp 7887099 261105&gt;<br> 21:10:09.522298 IP 192.168.0.238.80 &gt; \
192.168.0.88.51763: . ack 19455 win 212 &lt;nop,nop,timestamp 261105 7887099&gt;<br> \
<br> I can only conclude that server-side CGI script was unable<br>
to properly parse uploaded file&#39;s data.<br>
<div class="Ih2E3d"><br>
&gt; Also can you please elaborate more on following. how can I use it and where<br>
&gt; ?<br>
&gt; &quot;#!/bin/sh<br>
&gt; printf &#39;\r\n&#39;<br>
&gt; cat &gt;/tmp/POSTDATA &quot;<br>
<br>
</div>Put this into /cgi-bin/fwupgrade.cgi file (relative to httpd&#39;s top \
directory):<br> <div class="Ih2E3d"><br>
#!/bin/sh<br>
printf &#39;\r\n&#39;<br>
cat &gt;/tmp/POSTDATA<br>
<br>
</div>make it executable, and use it as simplest CGI for saving unprocessed<br>
POST uploads. For example, user can initiate uploads from this<br>
simple page:<br>
<br>
test_upload.htm<br>
===============<br>
&lt;html&gt;&lt;body&gt;<br>
<div class="Ih2E3d">&lt;form action=&quot;/cgi-bin/fwupgrade.cgi&quot; \
enctype=&quot;multipart/form-data&quot; method=&quot;post&quot;&gt;<br> \
</div>&lt;p&gt;Please specify a file:<br> <div class="Ih2E3d">&lt;p&gt;&lt;input \
type=&quot;file&quot; name=&quot;datafile&quot; size=&quot;40&quot;&gt;<br> \
</div><div class="Ih2E3d">&lt;p&gt;&lt;input type=&quot;submit&quot; \
value=&quot;Send&quot;&gt;<br> </div>&lt;/form&gt;<br>
<font color="#888888"><br>
--<br>
vda<br>
</font></blockquote></div><br>



_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic