Support for file://

2008-09-01 Thread Petri Koistinen
Hi,

I would be nice if wget would also support file://.

Petri


How to debug wget ?

2008-09-01 Thread Jinhui Li
I am browsing the source code. And want to debug it to figure out how it
works.

So, somebody please tell me how to debug ( with GDB ) or where can I find
information that I need.

Sorry, if i bother you.


Re: How to debug wget ?

2008-09-01 Thread Saint Xavier
Hi
* Jinhui Li ([EMAIL PROTECTED]) wrote:
 I am browsing the source code. And want to debug it to figure out how it
 works.

 So, somebody please tell me how to debug ( with GDB ) or where can I find
 information that I need.

Compile Wget with debug informations (-g flag for GCC) and then run wget into
GDB. You can now use and see variables name, structs, function name instead
of unfriendly adresses and raw bytes, ...

I can't show every aspect of GDB. Use your favorite search engine for
more usage info.

Hints:
http://www.gnu.org/software/gdb/documentation/
http://www.google.com/search?hl=enq=gdb+howtobtnG=Search

Quick example:
$ CFLAGS=-g ./configure
$ make
$ cd src/
$ gdb ./wget
(gdb) set args -P tmpdir/ -p www.google.com
(gdb) break retrieve_url
Breakpoint 1 at 0x420260: file retr.c, line 601.
(gdb) break url_parse
Breakpoint 2 at 0x4231a0: file url.c, line 644.
(gdb) run
Starting program: /home/xav/xav/sxav/src/wget -P tmpdir/ -p www.google.com
[Thread debugging using libthread_db enabled]
[New Thread 0x7f1ad48566e0 (LWP 6580)]
[Switching to Thread 0x7f1ad48566e0 (LWP 6580)]

Breakpoint 2, url_parse (url=0x665810 http://www.google.com;, 
error=0x7fffdc866aa0, iri=0x665830) at url.c:644
644 {
(gdb) continue
Continuing.

Breakpoint 1, retrieve_url (origurl=0x665ae0 http://www.google.com/;, 
file=0x7fffdc866a70, newloc=0x7fffdc866a78, refurl=0x0, dt=0x7fffdc866a98, 
recursive=false, iri=0x665830) at retr.c:601
601 {
(gdb) bt
#0  retrieve_url (origurl=0x665ae0 http://www.google.com/;, 
file=0x7fffdc866a70, newloc=0x7fffdc866a78, refurl=0x0, dt=0x7fffdc866a98, 
recursive=false, iri=0x665830) at retr.c:601
#1  0x0041ed48 in retrieve_tree (start_url=0x665810 
http://www.google.com;, pi=0x0) at recur.c:292
#2  0x0041bc31 in main (argc=5, argv=0x7fffdc866d28) at main.c:1201
(gdb) p iri
$1 = (struct iri *) 0x665830
(gdb) p *iri
$2 = {uri_encoding = 0x665850 UTF-8, content_encoding = 0x0, utf8_encode = 
false}
(gdb) p iri-uri_encoding
$3 = 0x665850 UTF-8
(gdb) continue
Continuing.

Breakpoint 2, url_parse (url=0x665b20 http://www.google.com/;, 
error=0x7fffdc8669e0, iri=0x665830) at url.c:644
644 {
(gdb) continue
Continuing.
--2008-09-01 14:57:15--  http://www.google.com/
Resolving www.google.com (www.google.com)... 66.249.93.99
Connecting to www.google.com (www.google.com)|66.249.93.99|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://www.google.be/ [following]

Breakpoint 2, url_parse (url=0x669660 http://www.google.be/;, 
error=0x7fffdc8669e0, iri=0x665830) at url.c:644
644 {
(gdb) continue
Continuing.
--2008-09-01 14:57:18--  http://www.google.be/
Resolving www.google.be (www.google.be)... 66.249.93.104
Connecting to www.google.be (www.google.be)|66.249.93.104|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `tmpdir/www.google.be/index.html'

[ =  ] 6,146   --.-K/s   in 0.07s   

2008-09-01 14:57:18 (82.1 KB/s) - `tmpdir/www.google.be/index.html'
saved [6146]


Breakpoint 2, url_parse (url=0x665ae0 http://www.google.com/;, error=0x0, 
iri=0x0) at url.c:644
644 {
(gdb) q
The program is running.  Exit anyway? (y or n) y

Regards,
Saint Xavier.


Checkout Wget

2008-09-01 Thread vinothkumar raman
Hi all,

I need to checkout the complete source into my local hard disk. I am using
WinCVS when i searched for the module its saying that there is no module
information out there. Could any one help me out i am a complete novice in
this regard.

Thanks,
VinothKumar.R


Checking out Wget

2008-09-01 Thread vinothkumar raman
Hi all,

I need to checkout the complete source into my local hard disk. I am using
WinCVS when i searched for the module its saying that there is no module
information out there. Could any one help me out i am a complete novice in
this regard.

Thanks,
VinothKumar.R


BUG : 202329 IF-MODIFIED-SINCE

2008-09-01 Thread vinothkumar raman
Hi all,

We need to give out the time stamp the local file in the Request
header for that we need to pass on the local file's time stamp from
http_loop() to get_http() . The only way to pass on this without
altering the signature of the function is to add a field to struct url
in url.h

Could we go for it?

Thanks,
VinothKumar.R


[BUG:#20329] If-Modified-Since support

2008-09-01 Thread vinothkumar raman
Hi all,

We need to give out the time stamp the local file in the Request
header for that we need to pass on the local file's time stamp from
http_loop() to get_http() . The only way to pass on this without
altering the signature of the function is to add a field to struct url
in url.h

Could we go for it?

Thanks,
VinothKumar.R


Re: [bug #20329] Make HTTP timestamping use If-Modified-Since

2008-09-01 Thread vinothkumar raman
This mean we should remove the previous HEAD request code and use
If-Modified-Since by default and have it to handle all the request and
store pages if it is not returning a 304 response

Is it so?


On Fri, Aug 29, 2008 at 11:06 PM, Micah Cowan [EMAIL PROTECTED] wrote:

 Follow-up Comment #4, bug #20329 (project wget):

 verbatim-mode's not all that readable.

 The gist is, we should go ahead and use If-Modified-Since, perhaps even now
 before there's true HTTP/1.1 support (provided it works in a reasonable
 percentage of cases); and just ensure that any Last-Modified header is sane.

___

 Reply to this item at:

  http://savannah.gnu.org/bugs/?20329

 ___
  Message sent via/by Savannah
  http://savannah.gnu.org/