I found bug in current version htdig3.
htdig don't work with option -u <uname:passwd>
It's is because of two added lines in Retriever.cc
delete doc;
doc = new Document;
Now we lost doc->authorization!!!
I see 2 way to recovery password functionality:
1. Patch and use doc->Reset() enstead of {delete doc; doc = new Document }
2. move variable credentials in main.cc to global variables and insert after
{delete doc; doc = new Document }
doc->setUsernamePassword(credentials );
Here is implementation 1-st way.
Vadim Chekan.
Index: htdig3/htdig/Document.cc
===================================================================
RCS file: /opt/htdig/cvs/htdig3/htdig/Document.cc,v
retrieving revision 1.18
diff -u -p -r1.18 Document.cc
--- Document.cc 1998/10/18 21:22:16 1.18
+++ Document.cc 1998/10/25 12:21:13
@@ -160,7 +160,7 @@ Document::Reset()
contents = 0;
redirected_to = 0;
- authorization = 0;
+// authorization = 0;
}
Index: htdig3/htdig/Retriever.cc
===================================================================
RCS file: /opt/htdig/cvs/htdig3/htdig/Retriever.cc,v
retrieving revision 1.13
diff -u -p -r1.13 Retriever.cc
--- Retriever.cc 1998/10/21 16:34:19 1.13
+++ Retriever.cc 1998/10/25 12:21:16
@@ -298,8 +298,12 @@ Retriever::parse_url(URLRef &urlRef)
cout.flush();
}
- delete doc;
- doc = new Document;
+// delete doc;
+// doc = new Document;
+
+// doc->setUsernamePassword(???);
+ doc->Reset();
+
doc->Url(url.get());
doc->Referer(urlRef.Referer());
----------------------------------------------------------------------
To unsubscribe from the htdig mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the body of the message.