POST followed by GET

2003-10-13 Thread Tony Lewis
I'm trying to figure out how to do a POST followed by a GET.

If I do something like:

wget http://www.somesite.com/post.cgi --post-data 'a=1&b=2' 
http://www.somesite.com/getme.html -d

I get the following behavior:

POST /post.cgi HTTP/1.0

[POST data: a=1&b=2]

POST /getme.html HTTP/1.0

[POST data: a=1&b=2]

Is this what is expected? Is there a way I can coax wget to POST to post.cgi and GET 
getme.html?

Tony

Re: touch() on Windows

2003-10-13 Thread Gisle Vanem
"Hrvoje Niksic" <[EMAIL PROTECTED]> said:

> Wget already has code that closes and reopens "output document" if
> it's a regular file.  Perhaps the same should be done here...

Allthough IE or other browsers doesn't seems to do it, I think it would
be a good thing to honour the "Last-Modified" header on regular output 
files.

--gv





Re: touch() on Windows

2003-10-13 Thread Hrvoje Niksic
"Gisle Vanem" <[EMAIL PROTECTED]> writes:

> It seems touch() is called on an open file and hence utime() is
> either silently ignored or causing "Access denied" on Watcom.
[...]
>wget -d -Otcpdump.tgz http://www.tcpdump.org/daily/tcpdump-2003.09.29.tar.gz
> [touch] Should IMHO be called after the file is closed.

It is -- except when you specify -O.  Normally the output file is
closed in gethttp().  But when -O is used, Wget doesn't close the file
so it can continue to write to the same file descriptor for the next
URL.

The confusing thing with -O is that, as it now stands, it affects the
way Wget works in various strange ways.  It works differently because
it is meant to allow streaming, as in `wget -O - URL', or even
streaming of multiple URLs: `wget -O - URL1 URL2...'.  It's
questionable whether honoring Last-Modified even makes sense in that
case!

Wget already has code that closes and reopens "output document" if
it's a regular file.  Perhaps the same should be done here...



Re: Web page "source" using wget?

2003-10-13 Thread Hrvoje Niksic
"Jens Rösner" <[EMAIL PROTECTED]> writes:

> Hi Hrvoje!
>
>> > retrieval, eventhough the cookie is there.  I think that is a
>> > correct behaviour for a secure server, isn't it?
>> Why would it be correct?  
> Sorry, I seem to have been misled by my own (limited) experience:
>>From the few secure sites I use, most will not let you 
> log in again after you closed and restarted your browser

That merely means that the cookie is marked non-permanent -- which is
probably the case here as well.  A site that banned reconnecting would
effectively ban all HTTP/1.0 browsers, which would probably be going
too far.



Re: Web page "source" using wget?

2003-10-13 Thread Jens Rösner
Hi Hrvoje!

> > retrieval, eventhough the cookie is there.  I think that is a
> > correct behaviour for a secure server, isn't it?
> Why would it be correct?  
Sorry, I seem to have been misled by my own (limited) experience:
>From the few secure sites I use, most will not let you 
log in again after you closed and restarted your browser or redialed 
your connection. That's what reminded my of Suhas' problem.

> Even if it were the case, you could tell Wget to use the same
> connection, like this:
> wget http://URL1... http://URL2...
Right, I always forget that, thanks!

Cya
Jens



-- 
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++



Re: Web page "source" using wget?

2003-10-13 Thread Hrvoje Niksic
"Suhas Tembe" <[EMAIL PROTECTED]> writes:

> The other thing I noticed is that the first URL (to log in) does not
> seem to work, because when I use that same URL in IE, it brings me
> back to the login screen (see attached "source" of the login
> page). I don't get logged-in.

Why are you using that URL if it is confirmed that it doesn't work?

The  tag in the login script specifies the POST method.
Therefore it is quite possible that the login script requires the use
of POST.  If that is the case, you'll need to get Wget 1.9-beta and
provide login information with the `--post-data' option.

I'm sorry I don't have better news for you.  Web services can be a
real pain.


Re: touch() on Windows

2003-10-13 Thread Gisle Vanem
> It seems touch() is called on an open file and hence
> utime() is either silently ignored or causing "Access denied" on
> Watcom.

Correction; Watcom says "Permission denied".

--gv




Re: Web page "source" using wget?

2003-10-13 Thread Hrvoje Niksic
"Suhas Tembe" <[EMAIL PROTECTED]> writes:

> Cookies.txt looks like this:
>
> # HTTP cookie file.
> # Generated by Wget on 2003-10-13 13:19:26.
> # Edit at your own risk.
>
> There is nothing after the 3rd line. So, it doesn't look like a
> valid cookie file.

It's valid all right, but there are no cookies inside.  The thing is,
Wget will only save cookies that are marked as permanent through an
expiry date in the future.  Currently there is no way to force saving
non-permanent cookies.

You can, however, run both URLs in the same Wget invocation by
providing them both on the command line.  That way cookies should be
shared.


touch() on Windows

2003-10-13 Thread Gisle Vanem
It seems touch() is called on an open file and hence
utime() is either silently ignored or causing "Access denied" on
Watcom.

I added this inside touch():
  DEBUGP (("touching %s to %.24s\n", file, asctime(localtime(&tm;

And ran:

>wget -d -Otcpdump.tgz http://www.tcpdump.org/daily/tcpdump-2003.09.29.tar.gz

---request begin---
GET /daily/tcpdump-2003.09.29.tar.gz HTTP/1.0
User-Agent: Wget/1.9-b5
...
Last-Modified: Mon, 29 Sep 2003 09:05:27 GMT
ETag: "492f4-7e693-3f77f5d7"
...

touching tcpdump.tgz to Mon Sep 29 11:05:27 2003
..

>dir /mk tcp*

13.10.2003  19:01 517 779  tcpdump.tgz

As you see utime() doesn't do anything.
The code in http.c/ftp.c is hard to follow, so question is 
when the touch() is called. Should IMHO be called after the 
file is closed.

Alternative hack (only for MingW/MSVC) is to use
int _futime (int handle, struct _utimbuf *filetime);

but I guess no one else has this.

--gv




Re: Web page "source" using wget?

2003-10-13 Thread Suhas Tembe
Cookies.txt looks like this:

# HTTP cookie file.
# Generated by Wget on 2003-10-13 13:19:26.
# Edit at your own risk.

There is nothing after the 3rd line. So, it doesn't look like a valid cookie file.


- Original Message - 
From: "Hrvoje Niksic" <[EMAIL PROTECTED]>
To: "Suhas Tembe" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, October 13, 2003 12:57 PM
Subject: Re: Web page "source" using wget?


> "Suhas Tembe" <[EMAIL PROTECTED]> writes:
> 
> > I tried, but it doesn't seem to have worked. This what I did:
> >
> > wget --save-cookies=cookies.txt 
> > http://customer.website.com?UserAccount=USER&AccessCode=PASSWORD&Locale=English 
> > (United States)&TimeZone=(GMT-5:00) Eastern Standard Time (USA & 
> > Canada)&action-Submit=Login
> 
> Hopefully you used quotes to protect the spaces in URLs from the
> shell?
> 
> After the first command, does `cookies.txt' contains what looks like a
> valid cookie?



Re: Web page "source" using wget?

2003-10-13 Thread Suhas Tembe
So, is there a way I can get to the page I want after logging into a secure server 
using wget? Can I keep the SSL connection open for the second retrieval to work?

The other thing I noticed is that the first URL (to log in) does not seem to work, 
because when I use that same URL in IE, it brings me back to the login screen (see 
attached "source" of the login page). I don't get logged-in. I am not quite sure if it 
is the URL that is incorrect or it is something else.

Thanks,
Suhas


- Original Message - 
From: "Jens Rösner" <[EMAIL PROTECTED]>
To: "Suhas Tembe" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, October 13, 2003 12:51 PM
Subject: Re: Web page "source" using wget?


> Hi Suhas!
> 
> Well, I am by no means an expert, but I think that wget 
> closes the connection after the first retrieval. 
> The SSL server realizes this and decides that wget has no right to log in 
> for the second retrieval, eventhough the cookie is there.
> I think that is a correct behaviour for a secure server, isn't it?
> 
> Does this make sense? 
> Jens
> 
> 
> > A slight correction the first wget should read:
> > 
> > wget --save-cookies=cookies.txt 
> > http://customer.website.com/supplyweb/general/default.asp?UserAccount=U
> > SER&AccessCode=PASSWORD&Locale=en-us&TimeZone=EST:-300&action-Submi
> > t=Login
> > 
> > I tried this link in IE, but it it comes back to the same login screen. 
> > No errors messages are displayed at this point. Am I missing something? 
> > I have attached the "source" for the login page.
> > 
> > Thanks,
> > Suhas
> > 
> > 
> > - Original Message - 
> > From: "Suhas Tembe" <[EMAIL PROTECTED]>
> > To: "Hrvoje Niksic" <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Monday, October 13, 2003 11:53 AM
> > Subject: Re: Web page "source" using wget?
> > 
> > 
> > I tried, but it doesn't seem to have worked. This what I did:
> > 
> > wget --save-cookies=cookies.txt 
> > http://customer.website.com?UserAccount=USER&AccessCode=PASSWORD&Loca
> > le=English (United States)&TimeZone=(GMT-5:00) Eastern Standard Time 
> > (USA & Canada)&action-Submit=Login
> > 
> > wget --load-cookies=cookies.txt 
> > http://customer.website.com/supplyweb/smi/inventorystatus.asp?cboSupplier
> > =4541-134289&status=all&action-select=Query 
> > --http-user=4542-134289
> > 
> > After executing the above two lines, it creates two files: 
> > 1). "[EMAIL PROTECTED]" :  I can see that 
> > this file contains a message (among other things): "Your session has 
> > expired due to a period of inactivity"
> > 2). "[EMAIL PROTECTED]"
> > 
> > Thanks,
> > Suhas
> > 
> > 
> > - Original Message - 
> > From: "Hrvoje Niksic" <[EMAIL PROTECTED]>
> > To: "Suhas Tembe" <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Monday, October 13, 2003 11:37 AM
> > Subject: Re: Web page "source" using wget?
> > 
> > 
> > > "Suhas Tembe" <[EMAIL PROTECTED]> writes:
> > > 
> > > > There are two steps involved:
> > > > 1). Log in to the customer's web site. I was able to create the 
> > following link after I looked at the  section in the "source" as 
> > explained to me earlier by Hrvoje.
> > > > wget 
> > http://customer.website.com?UserAccount=USER&AccessCode=PASSWORD&Loca
> > le=English (United States)&TimeZone=(GMT-5:00) Eastern Standard Time 
> > (USA & Canada)&action-Submit=Login
> > > 
> > > Did you add --save-cookies=FILE?  By default Wget will use cookies,
> > > but will not save them to an external file and they will therefore be
> > > lost.
> > > 
> > > > 2). Execute: wget
> > > > 
> > http://customer.website.com/InventoryStatus.asp?cboSupplier=4541-134289
> > &status=all&action-select=Query
> > > 
> > > For this step, add --load-cookies=FILE, where FILE is the same file
> > > you specified to --save-cookies above.
> > 
> > 
> 
> -- 
> NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
> Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService
> 
> Jetzt kostenlos anmelden unter http://www.gmx.net
> 
> +++ GMX - die erste Adresse für Mail, Message, More! +++
> 



SupplyWEB Login

var amSymbol = "AM";
var pmSymbol = "PM";
var negativeSymbol = "-";

var dateSeparator = "/";
var dateFormat = "M/dd/";

var timeSeparator = ":";
var timeFormat = "h:mm:ss t";

var decimalSeparator = ".";

function setIcon(icon, required, valid) {
  if (!valid) {
icon.alt = "X";
icon.src = "../images/error.gif";
  } else if (required) {
icon.alt = "*";
icon.src = "../images/required.gif";
  } else {
icon.alt = " ";
icon.src = "../images/blank.gif";
  }
}

function login_UserAccount_validate() {
  var valid = true;
  setIcon(document.login.UserAccount_icon, true, valid);
  return valid;
}

function login_AccessCode_validate() {
  var valid = true;
  setIcon(document.login.AccessCode_icon, true, valid);
  return valid;
}

function login_Locale_validate() {
  var valid = true;
  if (valid) valid = login_Locale_custom_validate(document.login.Locale);
 

Re: Web page "source" using wget?

2003-10-13 Thread Hrvoje Niksic
"Jens Rösner" <[EMAIL PROTECTED]> writes:

> Well, I am by no means an expert, but I think that wget closes the
> connection after the first retrieval. The SSL server realizes this
> and decides that wget has no right to log in for the second
> retrieval, eventhough the cookie is there.  I think that is a
> correct behaviour for a secure server, isn't it?

Why would it be correct?  Persistent connections are a mere
optimization; a new connection should work as well as the old one, as
long as the credentials (usually provided by a cookie) are provided.

There are security mechanisms that authorize on a per-connection
basis, and they require new log in for each new connections (I believe
NTLM is like this), but this should not be the case here.

Even if it were the case, you could tell Wget to use the same
connection, like this:

wget http://URL1... http://URL2...

In that case you shouldn't even have to bother with `--save-cookies'
and `--load-cookies'.  But maybe something else is going wrong for
Suhas; I really don't know.


Re: Web page "source" using wget?

2003-10-13 Thread Hrvoje Niksic
"Suhas Tembe" <[EMAIL PROTECTED]> writes:

> I tried, but it doesn't seem to have worked. This what I did:
>
> wget --save-cookies=cookies.txt 
> http://customer.website.com?UserAccount=USER&AccessCode=PASSWORD&Locale=English 
> (United States)&TimeZone=(GMT-5:00) Eastern Standard Time (USA & 
> Canada)&action-Submit=Login

Hopefully you used quotes to protect the spaces in URLs from the
shell?

After the first command, does `cookies.txt' contains what looks like a
valid cookie?


Re: Web page "source" using wget?

2003-10-13 Thread Jens Rösner
Hi Suhas!

Well, I am by no means an expert, but I think that wget 
closes the connection after the first retrieval. 
The SSL server realizes this and decides that wget has no right to log in 
for the second retrieval, eventhough the cookie is there.
I think that is a correct behaviour for a secure server, isn't it?

Does this make sense? 
Jens


> A slight correction the first wget should read:
> 
> wget --save-cookies=cookies.txt 
> http://customer.website.com/supplyweb/general/default.asp?UserAccount=U
> SER&AccessCode=PASSWORD&Locale=en-us&TimeZone=EST:-300&action-Submi
> t=Login
> 
> I tried this link in IE, but it it comes back to the same login screen. 
> No errors messages are displayed at this point. Am I missing something? 
> I have attached the "source" for the login page.
> 
> Thanks,
> Suhas
> 
> 
> - Original Message - 
> From: "Suhas Tembe" <[EMAIL PROTECTED]>
> To: "Hrvoje Niksic" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Monday, October 13, 2003 11:53 AM
> Subject: Re: Web page "source" using wget?
> 
> 
> I tried, but it doesn't seem to have worked. This what I did:
> 
> wget --save-cookies=cookies.txt 
> http://customer.website.com?UserAccount=USER&AccessCode=PASSWORD&Loca
> le=English (United States)&TimeZone=(GMT-5:00) Eastern Standard Time 
> (USA & Canada)&action-Submit=Login
> 
> wget --load-cookies=cookies.txt 
> http://customer.website.com/supplyweb/smi/inventorystatus.asp?cboSupplier
> =4541-134289&status=all&action-select=Query 
> --http-user=4542-134289
> 
> After executing the above two lines, it creates two files: 
> 1). "[EMAIL PROTECTED]" :  I can see that 
> this file contains a message (among other things): "Your session has 
> expired due to a period of inactivity"
> 2). "[EMAIL PROTECTED]"
> 
> Thanks,
> Suhas
> 
> 
> - Original Message - 
> From: "Hrvoje Niksic" <[EMAIL PROTECTED]>
> To: "Suhas Tembe" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Monday, October 13, 2003 11:37 AM
> Subject: Re: Web page "source" using wget?
> 
> 
> > "Suhas Tembe" <[EMAIL PROTECTED]> writes:
> > 
> > > There are two steps involved:
> > > 1). Log in to the customer's web site. I was able to create the 
> following link after I looked at the  section in the "source" as 
> explained to me earlier by Hrvoje.
> > > wget 
> http://customer.website.com?UserAccount=USER&AccessCode=PASSWORD&Loca
> le=English (United States)&TimeZone=(GMT-5:00) Eastern Standard Time 
> (USA & Canada)&action-Submit=Login
> > 
> > Did you add --save-cookies=FILE?  By default Wget will use cookies,
> > but will not save them to an external file and they will therefore be
> > lost.
> > 
> > > 2). Execute: wget
> > > 
> http://customer.website.com/InventoryStatus.asp?cboSupplier=4541-134289
> &status=all&action-select=Query
> > 
> > For this step, add --load-cookies=FILE, where FILE is the same file
> > you specified to --save-cookies above.
> 
> 

-- 
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++



Re: Web page "source" using wget?

2003-10-13 Thread Suhas Tembe
A slight correction the first wget should read:

wget --save-cookies=cookies.txt 
http://customer.website.com/supplyweb/general/default.asp?UserAccount=USER&AccessCode=PASSWORD&Locale=en-us&TimeZone=EST:-300&action-Submit=Login

I tried this link in IE, but it it comes back to the same login screen. No errors 
messages are displayed at this point. Am I missing something? I have attached the 
"source" for the login page.

Thanks,
Suhas


- Original Message - 
From: "Suhas Tembe" <[EMAIL PROTECTED]>
To: "Hrvoje Niksic" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, October 13, 2003 11:53 AM
Subject: Re: Web page "source" using wget?


I tried, but it doesn't seem to have worked. This what I did:

wget --save-cookies=cookies.txt 
http://customer.website.com?UserAccount=USER&AccessCode=PASSWORD&Locale=English 
(United States)&TimeZone=(GMT-5:00) Eastern Standard Time (USA & 
Canada)&action-Submit=Login

wget --load-cookies=cookies.txt 
http://customer.website.com/supplyweb/smi/inventorystatus.asp?cboSupplier=4541-134289&status=all&action-select=Query
 --http-user=4542-134289

After executing the above two lines, it creates two files: 
1). "[EMAIL PROTECTED]" :  I can see that this file contains a message (among other 
things): "Your session has expired due to a period of inactivity"
2). "[EMAIL PROTECTED]"

Thanks,
Suhas


- Original Message - 
From: "Hrvoje Niksic" <[EMAIL PROTECTED]>
To: "Suhas Tembe" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, October 13, 2003 11:37 AM
Subject: Re: Web page "source" using wget?


> "Suhas Tembe" <[EMAIL PROTECTED]> writes:
> 
> > There are two steps involved:
> > 1). Log in to the customer's web site. I was able to create the following link 
> > after I looked at the  section in the "source" as explained to me earlier by 
> > Hrvoje.
> > wget 
> > http://customer.website.com?UserAccount=USER&AccessCode=PASSWORD&Locale=English 
> > (United States)&TimeZone=(GMT-5:00) Eastern Standard Time (USA & 
> > Canada)&action-Submit=Login
> 
> Did you add --save-cookies=FILE?  By default Wget will use cookies,
> but will not save them to an external file and they will therefore be
> lost.
> 
> > 2). Execute: wget
> > http://customer.website.com/InventoryStatus.asp?cboSupplier=4541-134289&status=all&action-select=Query
> 
> For this step, add --load-cookies=FILE, where FILE is the same file
> you specified to --save-cookies above.




Re: Web page "source" using wget?

2003-10-13 Thread Suhas Tembe
I tried, but it doesn't seem to have worked. This what I did:

wget --save-cookies=cookies.txt 
http://customer.website.com?UserAccount=USER&AccessCode=PASSWORD&Locale=English 
(United States)&TimeZone=(GMT-5:00) Eastern Standard Time (USA & 
Canada)&action-Submit=Login

wget --load-cookies=cookies.txt 
http://customer.website.com/supplyweb/smi/inventorystatus.asp?cboSupplier=4541-134289&status=all&action-select=Query
 --http-user=4542-134289

After executing the above two lines, it creates two files: 
1). "[EMAIL PROTECTED]" :  I can see that this file contains a message (among other 
things): "Your session has expired due to a period of inactivity"
2). "[EMAIL PROTECTED]"

Thanks,
Suhas


- Original Message - 
From: "Hrvoje Niksic" <[EMAIL PROTECTED]>
To: "Suhas Tembe" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, October 13, 2003 11:37 AM
Subject: Re: Web page "source" using wget?


> "Suhas Tembe" <[EMAIL PROTECTED]> writes:
> 
> > There are two steps involved:
> > 1). Log in to the customer's web site. I was able to create the following link 
> > after I looked at the  section in the "source" as explained to me earlier by 
> > Hrvoje.
> > wget 
> > http://customer.website.com?UserAccount=USER&AccessCode=PASSWORD&Locale=English 
> > (United States)&TimeZone=(GMT-5:00) Eastern Standard Time (USA & 
> > Canada)&action-Submit=Login
> 
> Did you add --save-cookies=FILE?  By default Wget will use cookies,
> but will not save them to an external file and they will therefore be
> lost.
> 
> > 2). Execute: wget
> > http://customer.website.com/InventoryStatus.asp?cboSupplier=4541-134289&status=all&action-select=Query
> 
> For this step, add --load-cookies=FILE, where FILE is the same file
> you specified to --save-cookies above.



Re: Web page "source" using wget?

2003-10-13 Thread Hrvoje Niksic
"Suhas Tembe" <[EMAIL PROTECTED]> writes:

> There are two steps involved:
> 1). Log in to the customer's web site. I was able to create the following link after 
> I looked at the  section in the "source" as explained to me earlier by Hrvoje.
> wget http://customer.website.com?UserAccount=USER&AccessCode=PASSWORD&Locale=English 
> (United States)&TimeZone=(GMT-5:00) Eastern Standard Time (USA & 
> Canada)&action-Submit=Login

Did you add --save-cookies=FILE?  By default Wget will use cookies,
but will not save them to an external file and they will therefore be
lost.

> 2). Execute: wget
> http://customer.website.com/InventoryStatus.asp?cboSupplier=4541-134289&status=all&action-select=Query

For this step, add --load-cookies=FILE, where FILE is the same file
you specified to --save-cookies above.


Re: Web page "source" using wget?

2003-10-13 Thread Suhas Tembe
Thanks Hrvoje, using 
http://.../InventoryStatus.asp?cboSupplier=4541-134289&status=all&action-select=Query 
in IE worked like a charm. I didn't have to follow links. I am now trying to automate 
this using wget 1.8.2 (Windows).

There are two steps involved:
1). Log in to the customer's web site. I was able to create the following link after I 
looked at the  section in the "source" as explained to me earlier by Hrvoje.

wget http://customer.website.com?UserAccount=USER&AccessCode=PASSWORD&Locale=English 
(United States)&TimeZone=(GMT-5:00) Eastern Standard Time (USA & 
Canada)&action-Submit=Login

2). Execute: wget 
http://customer.website.com/InventoryStatus.asp?cboSupplier=4541-134289&status=all&action-select=Query
 

I tried different ways to get this working, but so far have been unsuccessful. Any 
ideas?

Thanks,
Suhas


- Original Message - 
From: "Hrvoje Niksic" <[EMAIL PROTECTED]>
To: "Suhas Tembe" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, October 07, 2003 6:12 PM
Subject: Re: Web page "source" using wget?


> "Suhas Tembe" <[EMAIL PROTECTED]> writes:
> 
> > It does look a little complicated This is how it looks:
> >
> >  [...]
> > 
> > 454A
> > 454B
> > 
> 
> Those are the important parts.  It's not hard to submit this form.
> With Wget 1.9, you can even use the POST method, e.g.:
> 
> wget http://.../InventoryStatus.asp --post-data \
>  'cboSupplier=4541-134289&status=all&action-select=Query' \
>  -O InventoryStatus1.asp
> wget http://.../InventoryStatus.asp --post-data \
>  'cboSupplier=4542-134289&status=all&action-select=Query'
>  -O InventoryStatus2.asp
> 
> It might even work to simply use GET, and retrieve
> http://.../InventoryStatus.asp?cboSupplier=4541-134289&status=all&action-select=Query
> without the need for `--post-data' or `-O', but that depends on the
> ASP script that does the processing.
> 
> The harder part is to automate this process for *any* values in the
> drop-down list.  You might need to use an intermediary Perl script
> that extracts all the  from the HTML source of the
> page with the drop-down.  Then, from the output of the Perl script,
> you call Wget as shown above.
> 
> It's doable, but it takes some work.  Unfortunately, I don't know of a
> (command-line) tool that would make this easier.
> 



Re: Wget 1.9-beta5 available for testing

2003-10-13 Thread Hrvoje Niksic
Herold Heiko <[EMAIL PROTECTED]> writes:

> C:\Programmi\Microsoft Visual Studio\VC98\Include\Native.h has:
> typedef long int32_t;

I see.  We're currently not using signed 32-bit variables, so I guess
the point is moot.


RE: Wget 1.9-beta5 available for testing

2003-10-13 Thread Herold Heiko
C:\Programmi\Microsoft Visual Studio\VC98\Include\Native.h has:
typedef long int32_t;
However the comment for Native.h says:
// Public header for facilities provided by MSJava.dll
so I don't know if that one should be used. As a matter of fact the only
other header including Native.h is Nativcom.h:
// Public header for COM-marshaling facilities provided by MSJava.dll

Heiko

-- 
-- PREVINET S.p.A. www.previnet.it
-- Heiko Herold [EMAIL PROTECTED]
-- +39-041-5907073 ph
-- +39-041-5907472 fax

> -Original Message-
> From: Hrvoje Niksic [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 13, 2003 4:02 PM
> To: Herold Heiko
> Cc: [EMAIL PROTECTED]
> Subject: Re: Wget 1.9-beta5 available for testing
> 
> 
> Herold Heiko <[EMAIL PROTECTED]> writes:
> 
> >> From: Hrvoje Niksic [mailto:[EMAIL PROTECTED]
> >> Does it compile if you change "#define HAVE_U_INT32_T 1" to "#undef
> >> HAVE_U_INT32_T" in config.h.ms?
> >
> > It does.
> > Windows msvc binary at http://xoomer.virgilio.it/hherold
> 
> Cool.  BTW does MSVC have int32_t?
> 


RE: Wget 1.9-beta5 available for testing

2003-10-13 Thread Herold Heiko
> From: Hrvoje Niksic [mailto:[EMAIL PROTECTED]
> Does it compile if you change "#define HAVE_U_INT32_T 1" to "#undef
> HAVE_U_INT32_T" in config.h.ms?

It does.
Windows msvc binary at http://xoomer.virgilio.it/hherold

Heiko

-- 
-- PREVINET S.p.A. www.previnet.it
-- Heiko Herold [EMAIL PROTECTED]
-- +39-041-5907073 ph
-- +39-041-5907472 fax


Re: Wget 1.9-beta5 available for testing

2003-10-13 Thread Hrvoje Niksic
Herold Heiko <[EMAIL PROTECTED]> writes:

>> From: Hrvoje Niksic [mailto:[EMAIL PROTECTED]
>> Does it compile if you change "#define HAVE_U_INT32_T 1" to "#undef
>> HAVE_U_INT32_T" in config.h.ms?
>
> It does.
> Windows msvc binary at http://xoomer.virgilio.it/hherold

Cool.  BTW does MSVC have int32_t?


Re: Wget 1.9-beta5 available for testing

2003-10-13 Thread Hrvoje Niksic
Herold Heiko <[EMAIL PROTECTED]> writes:

>> 
>> This beta includes portability tweaks and minor improvements.  Please
>> test it on as many diverse platforms as possible, preferrably with
>> both gcc and non-gcc compilers.  If all goes well, I'd like to release
>> 1.9 perhaps as early as tomorrow.
>
> Windows, msvc:

It seems that MSVC doesn't have *u_int32_t.

Does it compile if you change "#define HAVE_U_INT32_T 1" to "#undef
HAVE_U_INT32_T" in config.h.ms?


Re: very simple wget syntax question (-d info added) ...

2003-10-13 Thread Hrvoje Niksic
"Simons, Rick" <[EMAIL PROTECTED]> writes:

> I believe 1.8 was an rpm install, but I could be mistaken.  You are
> right about the 1.9 install .. it was just a config/make/make
> install on the tar I nabbed.  How can I determine if I have SSL
> includes on a RH9 box?

I think you need to install the openssl-devel package.

> Could that be causing the server response --> file issue i'm
> experiencing?

Not really; the person who prepared the RPM obviously had the proper
includes, or the resulting executable wouldn't have been SSL-enabled.
The reason I asked you to try the latest version is in the hope that
the problem might have gone away.


RE: Wget 1.9-beta5 available for testing

2003-10-13 Thread Herold Heiko
> 
> This beta includes portability tweaks and minor improvements.  Please
> test it on as many diverse platforms as possible, preferrably with
> both gcc and non-gcc compilers.  If all goes well, I'd like to release
> 1.9 perhaps as early as tomorrow.

Windows, msvc:

host.c
host.c(604) : error C2065: 'u_int32_t' : undeclared identifier
host.c(604) : error C2146: syntax error : missing ';' before identifier
'addr_ipv4'
host.c(604) : error C2065: 'addr_ipv4' : undeclared identifier
host.c(605) : error C2275: 'ip_address' : illegal use of this type as an
expression
host.h(74) : see declaration of 'ip_address'
host.c(605) : error C2146: syntax error : missing ';' before identifier
'addr'
host.c(605) : error C2065: 'addr' : undeclared identifier
host.c(615) : error C2146: syntax error : missing ';' before identifier
'inet_addr'

Heiko

-- 
-- PREVINET S.p.A. www.previnet.it
-- Heiko Herold [EMAIL PROTECTED]
-- +39-041-5907073 ph
-- +39-041-5907472 fax


RE: very simple wget syntax question (-d info added) ...

2003-10-13 Thread Simons, Rick
I believe 1.8 was an rpm install, but I could be mistaken.  You are right
about the 1.9 install .. it was just a config/make/make install on the tar I
nabbed.  How can I determine if I have SSL includes on a RH9 box?  Could
that be causing the server response --> file issue i'm experiencing?


-Original Message-
From: Hrvoje Niksic [mailto:[EMAIL PROTECTED]
Sent: Monday, October 13, 2003 9:07 AM
To: Simons, Rick
Cc: '[EMAIL PROTECTED]'
Subject: Re: very simple wget syntax question (-d info added) ...


"Simons, Rick" <[EMAIL PROTECTED]> writes:

> Using 1.9 I get a different error ...
[...]
> using 1.9b5
> # ./wget https://filed1/InBox/FILE3 --http-user=user --http-passwd=pass
> https://filed1/InBox/FILE3: Unsupported scheme.

That just means that you haven't compiled 1.9-b5 with SSL.  Did you
compile 1.8.2 yourself on the same machine?  Do you have SSL includes
on the machine where you compiled 1.9-b5?


Re: very simple wget syntax question (-d info added) ...

2003-10-13 Thread Hrvoje Niksic
"Simons, Rick" <[EMAIL PROTECTED]> writes:

> Using 1.9 I get a different error ...
[...]
> using 1.9b5
> # ./wget https://filed1/InBox/FILE3 --http-user=user --http-passwd=pass
> https://filed1/InBox/FILE3: Unsupported scheme.

That just means that you haven't compiled 1.9-b5 with SSL.  Did you
compile 1.8.2 yourself on the same machine?  Do you have SSL includes
on the machine where you compiled 1.9-b5?


RE: very simple wget syntax question (-d info added) ...

2003-10-13 Thread Simons, Rick
Using 1.9 I get a different error ...


using 1.8.2=
# wget https://filed1/InBox/FILE3 --http-user=user --http-passwd=pass
--08:59:11--  https://filed1/InBox/FILE3
   => `FILE3'
Resolving filed1... done.
Connecting to filed1[10.144.52.235]:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]

[ <=> ] 3433.20K/s

08:59:12 (33.20 KB/s) - `FILE3' saved [34]

using 1.9b5
# ./wget https://filed1/InBox/FILE3 --http-user=user --http-passwd=pass
https://filed1/InBox/FILE3: Unsupported scheme.

# ./wget -V
GNU Wget 1.9-b5






-Original Message-
From: Hrvoje Niksic [mailto:[EMAIL PROTECTED]
Sent: Monday, October 13, 2003 8:44 AM
To: Simons, Rick
Cc: 'Tony Lewis'; '[EMAIL PROTECTED]'
Subject: Re: very simple wget syntax question (-d info added) ...


"Simons, Rick" <[EMAIL PROTECTED]> writes:

> I'm having trouble with downloading a file across https using wget.
> I can't figure out if it is something i'm doing wrong with wget
> syntax, or if the httpd server isn't working like it should.

I don't know what's goingn wrong here.  Your Wget syntax looks OK to
me.

> ---request begin---
> GET /InBox/FILE3 HTTP/1.0
> User-Agent: Wget/1.8.2
> Host: filed1
> Accept: */*
> Connection: Keep-Alive
> Authorization: Basic Znh0ZXN0aW5nOmZ4dGVzdGluZzE=
>
> ---request end---

The request is, as far as I can tell, correct.

Does the problem exist with Wget 1.9?  You can download a 1.9 beta
from http://fly.srk.fer.hr/~hniksic/wget/wget-1.9-b5.tar.gz


Re: very simple wget syntax question (-d info added) ...

2003-10-13 Thread Hrvoje Niksic
"Simons, Rick" <[EMAIL PROTECTED]> writes:

> I'm having trouble with downloading a file across https using wget.
> I can't figure out if it is something i'm doing wrong with wget
> syntax, or if the httpd server isn't working like it should.

I don't know what's goingn wrong here.  Your Wget syntax looks OK to
me.

> ---request begin---
> GET /InBox/FILE3 HTTP/1.0
> User-Agent: Wget/1.8.2
> Host: filed1
> Accept: */*
> Connection: Keep-Alive
> Authorization: Basic Znh0ZXN0aW5nOmZ4dGVzdGluZzE=
>
> ---request end---

The request is, as far as I can tell, correct.

Does the problem exist with Wget 1.9?  You can download a 1.9 beta
from http://fly.srk.fer.hr/~hniksic/wget/wget-1.9-b5.tar.gz


very simple wget syntax question (-d info added) ...

2003-10-13 Thread Simons, Rick
I'm having trouble with downloading a file across https using wget.  I can't
figure out if it is something i'm doing wrong with wget syntax, or if the
httpd server isn't working like it should.  

# wget -d https://filed1/InBox/FILE3 --http-user=blahuser
--http-passwd=blahpw

DEBUG output created by Wget 1.8.2 on linux-gnu.

--08:05:04--  https://filed1/InBox/FILE3
   => `FILE3'
Resolving filed1... done.
Caching filed1 => 10.144.52.235
Connecting to filed1[10.144.52.235]:443... connected.
Created socket 3.
Releasing 0x8081e00 (new refcount 1).
---request begin---
GET /InBox/FILE3 HTTP/1.0
User-Agent: Wget/1.8.2
Host: filed1
Accept: */*
Connection: Keep-Alive
Authorization: Basic Znh0ZXN0aW5nOmZ4dGVzdGluZzE=

---request end---
HTTP request sent, awaiting response... HTTP/1.1 200 OK
Date: Mon, 13 Oct 2003 12:09:21 GMT
Server: Apache/1.3.26 (Unix) mod_ssl/2.8.10 OpenSSL/0.9.6g
SecureTransport/4.1.2
Set-Cookie: FDX=P2kjW7IwAjxmm+q9HlG7yA==; path=/

Stored cookie filed1 443 / nonpermanent 0 Wed Dec 31 18:59:59 1969
 FDX P2kjW7IwAjxmm+q9HlG7yA==
Accept-Ranges: bytes
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Features: CHPWD;RTCK;STCK;ASC
Connection: close
Content-Type: text/plain; charset=UTF-8


Length: unspecified [text/plain]

[ <=> ] 3433.20K/s

Closing fd 3
08:05:05 (33.20 KB/s) - `FILE3' saved [34]

# cat FILE3
Virtual user blah logged in.


so the contents of FILE3 are the server replies, not the actual FILE3 on the
server.  Is this a httpd server issue or ...


Arkadiusz Miśkiewicz CS at FoE, Wroclaw University of Technology

2003-10-13 Thread J K

Witam!
FUCK YOU!

Z Pozdrowieniami
lek med JANUSZ KWIECIEŃ
ul.Polna 6
46-312 BODZANOWICE
ICQ 219989093
GG 1573275
AQQ 12284
0 pref 34 3596694 najpewniej po 22:00
W sprawach handlowych TYLKO poprzez e-mail
[EMAIL PROTECTED]

- Original Message -
From: "Arkadiusz Miskiewicz" <[EMAIL PROTECTED]>
To: "Hrvoje Niksic" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, October 13, 2003 12:27 AM
Subject: Re: some wget patches against beta3


On Tuesday 07 of October 2003 12:08, Hrvoje Niksic wrote:
> Thanks!

btw. looking into test4 I see that autoconf conception is used in weird way.
Normally aclocal.m4 is autogenerated by aclocal command (and it includes
sources of macros from /usr/share/autoconf/autoconf/*.m4 and from local
acinclude.m4).

You are seem to put all macros (even local macros!) inside of aclocal.m4.
This
is bad because it doesn't allow to regenerate autoconf/aclocal stuff in case
when it's needed. aclocal command will overwrite aclocal.m4 and all local
macros will be lost.

We at PLD are right now patching wget to move all local macros into
acinclude.m4 but it would be better if that was done properly at wget
maintainers level :)

ps. I see that beta5 is there so time to look into this one... argh, same
things as in test4
--
Arkadiusz MiśkiewiczCS at FoE, Wroclaw University of Technology
arekm.pld-linux.org AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux