Hi all,
Does anyone know if it is possible to set a wrong Content-Length with LWP?
Or if not, then how can we do it?
The following corrects it and sets it to "Content-length: 5":
$ua->post( $url, 'Content-Length' => 3, Content => '12345' );
The following also does the same, plus it shows a warni
From: Gisle Aas
On Mon, May 25, 2015 at 7:46 PM, Octavian Rasnita wrote:
Hello,
I set 2 default headers using default_header() method and one of them is
"Content-Type" which is set to "application/json", but it looks that it is
overidden with "applicat
Hello,
I set 2 default headers using default_header() method and one of them is
"Content-Type" which is set to "application/json", but it looks that it is
overidden with "application/x-www-form-urlencoded" when doing a POST
request. Is this intentionally?
use LWP::UserAgent;
my $ua = LWP::U
Hi,
I have tried to use 2 scripts which I think should do similar things, but the
first one is working, while the second is not. Can you make some light and tell
me what's the difference between them and why the second is not working?
1. The first:
use LWP::UserAgent;
my $ua = LWP::UserAgent-
I haven't tried it, but you may try to use:
:content_cb => \&callback
:read_size_hint => $bytes
And in the callback sub you can use sleep() or select( undef, undef, undef, )
to try to delay the download.
Octavian
- Original Message -
From: "Peng Yu"
To:
S
From: "John Peacock"
...
>> - instead of "use version;" I use "use version();".
>
> The sole difference between those two call is the former implicitly
> calls the version::import. And there are only two methods exported by
> default: qv() and UNIVERSAL::VERSION. As you can guess by the name,
Hi,
Here below I added a sample program that gives an error if WxPerl, LWP and
version.pm are used together.
The program works fine if either
- With Wx::Locale I use the language id 56 (for English) instead of 155 (for
Romanian) or
- instead of "use version;" I use "use version();".
The first
From: "Gisle Aas" <[EMAIL PROTECTED]>
The $ua->timeout() will abort a connection attempt that takes more
than the given number of seconds, but before LWP start the connect
call, it looks up the hostname which can take time that's not limited
by LWP. After the connection has been established, the
Hi,
If the network connection is broken, is there a way of setting a timeout
after which the LWP request returns?
I've seen that even if I set the timeout to 1 second, it takes much more
time until the request ends.
Thank you.
Octavian
- Original Message -
From: "Chris Boyce" <[EMAIL PROTECTED]>
To: "Octavian Rasnita" <[EMAIL PROTECTED]>
Cc: "Ted Behling" <[EMAIL PROTECTED]>;
Sent: Thursday, November 09, 2006 12:22 AM
Subject: Re: timeout
> This is not so much a solution,
in LWP, or a limitation of Windows, or I am doing something
wrong?
Thank you.
Teddy
- Original Message -----
From: "Ted Behling" <[EMAIL PROTECTED]>
To: "Octavian Rasnita" <[EMAIL PROTECTED]>;
Sent: Wednesday, November 08, 2006 8:22 PM
Subject: RE: timeout
Hi,
I am trying to create a very simple www client that times out after 5
seconds. I have tried the 2 examples below, but none of them are working.
They don't time out even though the target site cannot be found.
I think they time out after some more time.
I have ran them under Windows 2000 with
Hi,
I have tried:
use LWP::UserAgent;
my $url = "https://www.server.com/";;
my $ua = LWP::UserAgent->new(env_proxy => 0,
timeout => 200,
keep_alive => 1,
);
my $request = HTTP::Request->new('GET', $url);
my $response = $ua->request($request);
print $response->as_string();
---
The response
Hi,
Is LWP able to access a secure FTP server on port 22?
Thank you.
Teddy
Hi,
Please tell me how can I use the $request->header() in order to request a
page in compressed format (with gzip).
Thank you.
Teddy
Mattias Holmlund <[EMAIL PROTECTED]> declared:
> On mån, 2004-10-04 at 23:14, Ofer Nave wrote:
>
> Yes, that was suggested by Randal L. Schwartz as well. The reason I
> didn't do that is that I think that you want to have the BasePath as a
> user-configurable parameter. This parameter should proba
Hello,
I have tried to put the following code at the end of a script that downloads
something from the web using LWP::UserAgent, in order to write the number of
seconds it took the script to run, but it writes much less than it should:
print "" . (times)[0];
Please tell me how to get the time ne
From: "Gisle Aas" <[EMAIL PROTECTED]>
Just enable the cookie jar, with $ua->cookie_jar({}), and LWP will
manage the cookies for you.
--
Ok, I have tried that, but it still doesn't work as I want. I would like to
do something like the following code does in case the $request and $response
vars are
Hi,
I have found how to insert HTTP headers in the line:
$ua->get($url, ":content_file" => $file);
...But I still can't find how to get and send cookies in other way than
trying to manually add the headers for Cookies.
Thanks.
Teddy
- Original Message -----
Fr
Hello,
I want to create a module that will have a method that should work like a
download manager.
It will be able to automaticly resume downloads, meaning that if a local
file with a given name exists, it will start downloading the remote file
skipping the number of bytes that file contains, and
Hi all,
Can anyone please tell me how can I use a proxy server in order to GET an
html file from a server?
I have seen only examples using env_proxy=>0 but no example for using a
certain proxy.
I have a proxy and a port number that I would like to use. Does it matter if
it is an HTTP or a socks
Thanks for that address. I found that the new valid address for this program is:
http://www.mavensecurity.com/achilles
Teddy
- Original Message -
From: "Maynard Stevens" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: vineri, 23 iulie 2004 17:09 PM
From: "Lucas Gonze" <[EMAIL PROTECTED]>
To: "Octavian Rasnita" <[EMAIL PROTECTED]>
Cc: "Colin Magee" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, July 22, 2004 6:06 PM
Subject: Re: Viewing exchange between brows
Does anyone know a free proxy server for Windows that can be used to view
the sent and received packets?
Teddy
- Original Message -
From: "Colin Magee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, July 19, 2004 7:45 PM
Subject: RE: Viewing exchange betwe
Oh, in this case that page might not be found the search engines either.
From: "Potozniak, Andrew" <[EMAIL PROTECTED]>
> Thank you all for your help with this. I tracked what was going wrong down
> and finally got it to work.
>
> It turns out that WWW::Mechanize wasn't sending this header that
Oh yes, this was the problem, but I have seen that something happened to my
Perl installation because I was not able to install Compress::Zlib because
another module is missing and I am sure it could be more modules damaged, so
I have tried to reinstall from a .rpm package.
When I have used the -i
Hi all,
I have recieved the following error when I tried to run a simple script that
only downloads and prints a page. The script runs fine under Windows, but It
give this error when running under Linux.
Do you know which could be the cause for this error? Please tell me how can
I solve it.
The e
Hi,
I have succeeded downloading a file using the POST method using the help of
this list, but unfortunately I am not able to get the file name every time.
I have seen that if the web server sets the Content-Disposition header and
specifies the file name, I am able to use it, but sometimes this h
ED]>
Sent: Thursday, March 11, 2004 3:56 PM
Subject: Re: Using the post method for downloading a file
> Octavian Rasnita wrote:
>
> > Hi all,
> >
> > I am fighting to create a simple script for downloading a file from a
> > server, but I cannot do it.
> [snip
Hi all,
I am fighting to create a simple script for downloading a file from a
server, but I cannot do it.
I have tried:
use LWP::UserAgent;
my $ua = LWP::UserAgent->new(env_proxy=>0,
timeout=>120,
keep_alive=>1,
);
my $request = HTTP::Request->new('POST', $url);
my $response = $ua->request($req
Hi,
I've seen that is stranger than I thought.
Yes I also tried with HTTP in all caps, and I have also seen that I need to
specify the entire URI, not only the directory name, something like:
GET http://www.symantec.com/ HTTP/1.0
...but the strange part is that this command works, but only if I
host.
But after trying to manually type:
GET / http/1.0
...in order to display the main page, it disconnects after pressing the
first char (G).
Do you have any idea what could be the problem?
Thanks.
- Original Message -
From: "(William) Wenjie Wang" <[EMAIL PROTECTED]
Hi all,
I have seen that I cannot download some pages, like www.symantec.com using
LWP.
In fact I have also tried:
telnet www.symantec.com 80
GET ...
But after the first character (G), the connection to the server was
interrupted.
Do you know why I cannot download pages from this site like fro
I guess is a bug in URI library because I use that piece of code, and I also
use the scheme (http://) for all the urls, and I often have that problem,
sometimes when using the cookies library, and sometimes when I use the URI
library directly.
Teddy
- Original Message -
From: "Andy Leste
o
I don't think they are made special for this to work.
If you want I can give you examples.
Thanks.
Teddy,
Teddy's Center: http://teddy.fcc.ro/
[EMAIL PROTECTED]
- Original Message -
From: "Randal L. Schwartz" <[EMAIL PROTECTED]>
To: "Octavian Rasn
hank you.
Teddy,
Teddy's Center: http://teddy.fcc.ro/
[EMAIL PROTECTED]
- Original Message -
From: "Randal L. Schwartz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 16, 2003 6:16 PM
Subject: Re: range:
>>>>> "Octavian
Hi,
Do you know which servers don't support or which can be set not to accept
the following HTTP header?
Range: bytes=x-y
...meaning that that server allows resuming the downloads.
Is possible to set Apache not to allow this, so each visitor should get an
entire page?
If it is, please tell me
hod.
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
- Original Message -
From: "Sean M. Burke" <[EMAIL PROTECTED]>
To: "Octavian Rasnita" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, May 26, 2003 6:06 AM
Subject: Re: D
I have the same questions, but my question is more clear.
After downloading an HTML page, what modules can I use to read the cell 4
from the fifth row of a table, if that table is placed in another table in
the cell 2 of the row 3?
Is this possible with a module from HTML:: package?
I've tried re
Hi,
Is it possible to specify some environment variables when using LWP to get
an HTML page from a site?
I would like to specify the HTTP_HOST and others...
Thanks.
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
"Gisle Aas" <[EMAIL PROTECTED]>
To: "Octavian Rasnita" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, February 15, 2003 11:06 PM
Subject: Re: Getting the last 1 kb of a file
"Octavian Rasnita" <[EMAIL PROTECTED]> writes:
> Pleas
Hi all,
I've tried using:
...
$ua->max_size(650);
but after printing $ua->content(), the size of this was over 900 bytes, and
not only 650 as it should.
I've also tried using a limit of only 1 byte, but the size of the content
was of 509 bytes.
Is it a bug or what could be the problem?
What ca
Hi all,
I want to download the top of an html file, parse it for searching a string,
and if that string is found, I want to cancel downloading the rest of the
file.
If the string is not found, download the second part, and so on.
The problem is that even though I've set the chunk size to 6500, so
Hi all,
Please tell me how to get the last 1 kb of the file avoiding to download all
the file.
I've read the POD documentation for LWP::UserAgent, but I couldn't find
anything helpful.
Thank you very much.
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
Thank you!
I'm afraid to open an RFC file because I'm pretty sure that I won't
understand much, but I will do it.
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
- Original Message -
From: "Gisle Aas" <[EMAIL PROTECTED]>
To: "
Hi all,
I would like to create a kind of download manager that can resume downloads
using LWP.
Is it possible to download a file with LWP starting from a certain byte in
the file and not from the beginning of the file?
Can you give me some hints how could I do that?
If it is not possible using t
lash redirects
Thanks, I'll give these a try!
Chris G.
-Original Message-
From: Simon Wistow [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 17, 2003 4:20 AM
Cc: [EMAIL PROTECTED]
Subject: Re: Dealing with flash redirects
On Thu, Jan 16, 2003 at 08:47:50PM +0200, Octavian Rasn
It would be wonderful if there would be a Perl script that understands
Javascript, VBScript and Flash...
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
- Original Message -
From: "Chris Greenhill" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 16
"SearchName" => "Search1",
"DBFlag" => "CCAWEB",
"ExportFlag" => "No",
"SSmm1" => "1",
"SSdd1" => "6",
"SS1" => "2003&q
Can you tell us which of the controls of this form don't have a name?
I've seen that all of them have aname.
There is an input box with a name of "__Click" and others with other names,
and some radio buttons...
If you want to submit this form using the LWP module, you need to get the
address of
Is there LWP installed on that server?
You should check the web server error log or try to run the program from
command line if you have access.
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
- Original Message -
From: "Matt Ashby" <[EMAIL PROTECTED]>
To: <[EMAIL PRO
Hi all,
I've seen the last LWP and the last version of URI on CPAN but after
pressing the download link it told me that it cannot be found.
What could be the problem?
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
Hello,
Regarding my problem with the script that doesn't get the whole page when
launched by a web server, ... it is the same if I use LWP::Simple.
I've tried the following script:
#!/perl/bin/perl -w
use strict;
use LWP::Simple;
my $content = get('http://localhost/');
print $content;
It doe
d until then because I can't delete it and I know
that I can't close an open file in Windows.
Help!
Happy New Year!
Thank you for help.
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
- Original Message -
From: "Michael A Chase" <[EM
e" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Octavian Rasnita" <[EMAIL PROTECTED]>
Sent: Tuesday, December 31, 2002 6:40 AM
Subject: Re: Why doesn't this script work?
On Mon, 30 Dec 2002 09:40:31 +0200 Octavian Rasnita <[EMAIL PROTECTED]>
wrote:
>
Hi all,
I've tried to run the following script from command line under Windows and
it works fine, but if I run it from Internet Explorer, the page doesn't
print anything and it is still "Opening page...".
Can you tell me what could be the problem with it?
Thank you. Here is the script:
#!/perl/
Hi all,
I've tried the following script for downloading a file and it works fine if
the file size is not too big.
But if the file is very large, the computer gets out of memory.
Can you tell me how to do it?
Thank you.
Here is the part of my script:
my $ua = LWP::UserAgent -> new(env_proxy =>
I don't think you will really succeed because the image is usually very hard
to OCR even with the best OCR package.
I've tried that with the images used by Yahoo and I've succeeded only once,
but I've tried for tens of times.
This is a real problem for me because I am blind, and ...
But I would a
Hi all,
Does anyone know if it is possible to find out the name of all the files
from a directory from a remote computer for downloading them using the LWP
module?
Thank you.
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
Could you give me a hint about how can be MSIE controlled with COM?
What is COM?
Thank you.
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
- Original Message -
From: "John J Lee" <[EMAIL PROTECTED]>
To: "Octavian Rasnita" <[EMAIL
Hello all,
I've made a spider script which accepts and saves cookies, then send them
back.
I've tested with another little script which sends cookies and it works.
However, in a downloaded page I've seen an error written telling "Error! The
cookie can't be set".
Do you know if there are more wa
Thank you.
Could you tell me how could I use Mozilla js engine?
Just the main principle.
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
- Original Message -
From: "Eduardo M. Cavalcanti" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 06, 2002 1
Hi all,
I've made a spider that downloads all the web pages starting from an URL and
I don't know how I could downloads the pages that are linked using
Javascript.
If the link would be something like http://www.site.com/';">Site
this would be simple to parse, but the problem is with the javascrip
Hi,
I thought \w includes \d
Also, I thought there are domains like .info, so they won't work if you
specify only {2,3}
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
- Original Message -
From: "John Von Essen" <[EMAIL PROTECTED]>
To: "Schulz, Konrad" <[EMAIL PROTE
Ok, I need to explain you a little better to understand.
I am on dial-up, paying per minute.
I want to make a script that download a list of web sites on another
computer which is connected to internet all the time, create a tar.gz
archive with those files and directories, and after that I could d
Yes I found that there are a lot of bad links. I think they are more than
the good links.
Yes you're right that URL was not a real one. It doesn't always have the
part with http:// in the PATH_INFO.
Sometimes it has some directories and a simple local file at the end.
I can save it with any name
;s Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
- Original Message -
From: Fisher Mark
To: 'Octavian Rasnita' ; [EMAIL PROTECTED]
Sent: Wednesday, November 27, 2002 11:24 PM
Subject: RE: Help! how is this called?
> An example is:
>
> http://www.
Hi all,
I've seen some links that create me a lot of problems because I don't know
how to parse them and break into components.
An example is:
http://www.site.com/script.cfm/dir1/dir2/http://www.site.com/file.html
How is called the part after the script.cfm?
It is not a query because it doesn't
http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
- Original Message -
From: "Tillman, James" <[EMAIL PROTECTED]>
To: "'Octavian Rasnita'" <[EMAIL PROTECTED]>; "Gisle Aas"
<[EMAIL PROTECTED]>
Cc: "Keary Suska" <[EMAIL PROTECTED]>
nter: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
- Original Message -
From: "Gisle Aas" <[EMAIL PROTECTED]>
To: "Octavian Rasnita" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, November 26, 2002 9:52 PM
Subject: Re: Can the URI
Yes, I think this would be a good idea.
If the timeout is 0, nobody will see that page anyway.
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
- Original Message -
From: "Gisle Aas" <[EMAIL PROTECTED]>
To: "Octavian Rasnita" <[
Hi,
I saw that the URI module returns a $uri -> host even though the URL used is
not a correct one.
For example I've seen bad addresses like:
http://www:site.com/
This is a wrong address but the host method returns "www:site.com".
I think it is a good idea to return a null value instead.
An e
le Aas" <[EMAIL PROTECTED]>
To: "Octavian Rasnita" <[EMAIL PROTECTED]>
Cc: "Keary Suska" <[EMAIL PROTECTED]>; "Libwww Perl" <[EMAIL PROTECTED]>
Sent: Tuesday, November 26, 2002 6:36 AM
Subject: Re: LWP and Javascript?
"Octavian Ras
Thank you.
I know that http-equiv meta tags are considered HTTP headers by most
browsers.
Shouldn't be these tags considered HTTP headers by LWP also?
just an idea.
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
- Original Message -
From: "Keary Suska" <[EMAIL P
Hi all,
If some web sites set cookies using a javascript code, is there a way to
understand that code if I get that page with the LWP module?
Does LWP recognise a meta refresh to another page, as a page redirection?
Thanks a lot.
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTEC
I have the same problem under Windows 2000, running Perl 5.8.0.
The error was the same but it was found in HTTP/cookies.pm file.
It happends only for some links, but for the moment I don't know for what
types.
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
- Original Me
I am also very curious about an answer to this problem because I also have
it when using cookies with the LWP module under Windows 2000, Perl 5.8.
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
- Original Message -
From: "Darby Cacdac" <[EMAIL PROTECTED]>
To: <[EMAIL
Hi all,
I've made a script that uses the LWP module to get an HTML page from the
net.
Sometimes I use the full URL, that includes the file name, but sometimes I
use only the directory name like http://www.site.com/
Is there a method to find out the file name of the downloaded file?
I want to know
Hi all,
I have a big problem with a script that uses the LWP module.
The script works under Windows with Perl 5.6.1 but it doesn't work under
Linux with Perl 5.6.0.
I've tried to print the code from a response from server and it gives me the
code 501 and not 200 as it should.
The content of th
Teddy's Center: http://teddy.fcc.ro/
Mail: [EMAIL PROTECTED]
Hi all,
Please tell me how to find out the last modifying date of an .shtml file
using LWP::Simple, or if it is not possible with this module, using
LWP::UserAgent.
I've tried but it tells me the last modifying date of an .html file o
Hi all,
I want to get the header of an HTML file, check if it was modified since a
certain date, and print it.
I've tried using LWP::Simple, and I can get that information if the file
name ends in .html.
The problem is that if the file is an .shtml one, LWP::Simple returns only
the Server Name an
81 matches
Mail list logo