You are not logged in.
I'm having a problem with a little script to change some settings for IP-phones. Here is the script:
#!/bin/bash
for i in "0" #"4"
do
for j in $(seq 176 176)
do
wget --timeout=1 --tries=1 --keep-session-cookies --save-cookies cookies.txt --post-file=postfile http://192.168.$i.$j/dologin.htm
wget --timeout=1 --tries=1 --load-cookies cookies.txt --post-file=postfile2 http://192.168.$i.$j/update.htm
done
done
postfile looks like this and is just for logging in:
P2=<pass>&
postfile2 looks like this:
P270=123456&
The problem now is, when using it like above, everything works fine. But if I make the text in postfile2 one character longer, I get this:
Connecting to 192.168.0.176:80... connected.
HTTP request sent, awaiting response... Read error (Connection timed out) in headers.
Giving up.
It doesn't matter where I put the character to make the string longer (I can for example use P32=1234567& and it works). I have tested the script from different machines and used different phones, always the same. Any ideas?
Offline
Please show the request (use wireshark).
Offline
I made 2 tcpdumps, one working, the other not: http://www.iq-kunden.de/tcpdump/
Offline
The two files look identical, are you sure that the "bad" one is actually a capture of the timed out session? (both have same data length and same value in the content-length header).
Anyway, this timeout might occur, if for some reason wget will say content length is 10 and send only 9 characters in the post request..
Offline
The two files look identical, are you sure that the "bad" one is actually a capture of the timed out session? (both have same data length and same value in the content-length header).
Yes, they are different and the bad is is from the timeout .
Anyway, this timeout might occur, if for some reason wget will say content length is 10 and send only 9 characters in the post request..
Any idea what I can do about it? There is something fishy going on. I did this once before a few month ago when I wanted to change other settings. I tried to do the same thing again but even this doesn't work anymore. Maybe I should just try curl .
Offline
Yes, they are different and the bad is is from the timeout .
kinda doesnt make sense, coz if you look at bad.trace, you can see a normal 200OK server reply, so wget had no reason to complain.
Offline
rine wrote:Yes, they are different and the bad is is from the timeout .
kinda doesnt make sense, coz if you look at bad.trace, you can see a normal 200OK server reply, so wget had no reason to complain.
Well, it is as I said. Maybe I should say that the first wget works and the second doesn't?
Offline