bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] wget not terminating after file acquisition


From: Darshit Shah
Subject: Re: [Bug-wget] wget not terminating after file acquisition
Date: Sat, 23 Mar 2013 21:43:58 +0530

Could this be because the server responded with Length: Unspecified?
Probably a lack of the Length attribute made wget keep waiting for further
data?

As suggested by Giuseppe, please do check with a packet analyzer to test
whether the Server is closing is closing it's connection. If not, then the
issue lies with the server, else it's a bug in wget.

On Sat, Mar 23, 2013 at 8:59 PM, Giuseppe Scrivano <address@hidden>wrote:

> Hi,
>
> I couldn't reproduce it here, wget seems to terminate when the TCP
> connection is closed.
>
> Are you sure the server doesn't intentionally leave the TCP connection
> opened?  Could you use use a packet analyzer to see if it is closed?
>
> Thanks
>
> joep <address@hidden> writes:
>
> > Hi,
> >     I'm using wget to access the http page in my ADSL Modem\Router
> > that displays the IP the modem gets allocated when it connects. (I
> > will pick out the IP from the rest of the info on the page using sed
> > or similar commands. I then intend to 'post' this in an internet
> > accessible point so that I can remotely log into my home server.)
> >
> >     The command I'm using is:
> >
> >         wget -d --http-user=admin --http-password=*******
> > --no-http-keep-alive --timeout 15
> > http://192.168.1.1/setup.cgi?next_file=s_status.htm&todo=cfg_init
> >
> >     Where:
> >     -
> > http://192.168.1.1/setup.cgi?next_file=s_status.htm&todo=cfg_init is
> > the relevant page on my modem\router
> >     - ******* is the password to access the modem\router's management
> > interface
> >
> >     The response of wget is as follows:
> > --------------------------------- Response Start
> > ---------------------------------------
> >
> > [1] 3310
> > address@hidden:~/MyTemp$ Setting --http-user (httpuser) to
> admin
> > Setting --http-password (httppassword) to *******
> > Setting --http-keep-alive (httpkeepalive) to 0
> > Setting --timeout (timeout) to 15
> > DEBUG output created by Wget 1.13.4 on linux-gnu.
> >
> > URI encoding = 'UTF-8'
> > --2013-03-22 17:19:58--
> http://192.168.1.1/setup.cgi?next_file=s_status.htm
> > Host '192.168.1.1' has not issued a general basic challenge.
> > Connecting to 192.168.1.1:80... connected.
> > Created socket 3.
> > Releasing 0x09b29a80 (new refcount 0).
> > Deleting unused 0x09b29a80.
> >
> > ---request begin---
> > GET /setup.cgi?next_file=s_status.htm HTTP/1.1
> > User-Agent: Wget/1.13.4 (linux-gnu)
> > Accept: */*
> > Host: 192.168.1.1
> > Connection: Close
> >
> > ---request end---
> > HTTP request sent, awaiting response...
> > ---response begin---
> > HTTP/1.1 401 Unauthorized
> > Server:
> > Date: Fri, 22 Mar 2013 06:19:56 GMT
> > WWW-Authenticate: Basic realm="NETGEAR DG834  "
> > Content-Type: text/html
> > Connection: close
> >
> > ---response end---
> > 401 Unauthorized
> > Closed fd 3
> > Inserted '192.168.1.1' into basic_authed_hosts
> > Connecting to 192.168.1.1:80... connected.
> > Created socket 3.
> > Releasing 0x09b29a80 (new refcount 0).
> > Deleting unused 0x09b29a80.
> >
> > ---request begin---
> > GET /setup.cgi?next_file=s_status.htm HTTP/1.1
> > User-Agent: Wget/1.13.4 (linux-gnu)
> > Accept: */*
> > Host: 192.168.1.1
> > Connection: Close
> > Authorization: Basic YWRtaW46dW5kZXJzdGFuZDc=
> >
> > ---request end---
> > HTTP request sent, awaiting response...
> > ---response begin---
> > HTTP/1.0 200 OK
> > Content-type: text/html
> >
> > ---response end---
> > 200 OK
> > Length: unspecified [text/html]
> > Saving to: 'setup.cgi?next_file=s_status.htm'
> >
> >     [ <=>                                   ] 5,027 32.5K/s   in 0.2s
> >
> > Closed fd 3
> > 2013-03-22 17:19:58 (32.5 KB/s) - 'setup.cgi?next_file=s_status.htm'
> > saved [5027]
> >
> > -------------------- End Of Response ------------------------------------
> >
> >     To get to the command prompt I have to enter ^C. When I do I get:
> >
> >
> ---------------------------------------------------------------------------------
> >
> > ^C
> > [1]+  Done                    wget -d --http-user=admin
> > --http-password=******** --no-http-keep-alive --timeout 15
> > http://192.168.1.1/setup.cgi?next_file=s_status.htm
> > address@hidden:~/MyTemp$
> >
> >
> ----------------------------------------------------------------------------------
> >
> >     As indicated above the required page is acquired and stored.
> >
> >     I have called the wget without the options:
> >         --no-http-keep-alive and --timeout
> >     with the same result.
> >
> >     I also ran the command on a Debian wheezy platform with the same
> > result.
> >
> >     End of error report.
>
> --
> Giuseppe
>
>


-- 
Thanking You,
Darshit Shah
Research Lead, Code Innovation
Kill Code Phobia.
B.E.(Hons.) Mechanical Engineering, '14. BITS-Pilani


reply via email to

[Prev in Thread] Current Thread [Next in Thread]