Skip Menu |
 

This queue is for tickets about the Test-WWW-Selenium CPAN distribution.

Report information
The Basics
Id: 61019
Status: resolved
Worked: 2 hours (120 min)
Priority: 0/
Queue: Test-WWW-Selenium

People
Owner: Nobody in particular
Requestors: matsui [...] shanon.co.jp
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: The module doesn't use POST to send request to Selenium server (since ver. 1.20)
Date: Fri, 3 Sep 2010 18:10:59 +0900
To: bug-Test-WWW-Selenium [...] rt.cpan.org
From: So Matsui <matsui [...] shanon.co.jp>
Hello, Test-WWW-Selenium mainteners I'm using Test-WWW-Selenium for testing of our web application product, but have a problem when using the latest version of the module. Since versinon 1.16, it was changed to use POST to send request to Selenium server, but since 1.20, it was changed back to use GET. For this, I cannot submit long text data when I use the latest version. (URI too-long error occurs) The changes made in 'do_command' method between 1.19 and 1.20: ================================================== @@ -436,24 +455,24 @@ } $command = uri_escape($command); - my $fullurl = "http://$self->{host}:$self->{port}/selenium-server/driver/"; - my $content = "cmd=$command"; + my $fullurl = "http://$self->{host}:$self->{port}/selenium-server/driver/" + . "\?cmd=$command"; my $i = 1; @args = grep defined, @args; while (@args) { - $content .= "&$i=" . URI::Escape::uri_escape_utf8(shift @args); + $fullurl .= "&$i=" . URI::Escape::uri_escape_utf8(shift @args); $i++; } if (defined $self->{session_id}) { - $content .= "&sessionId=$self->{session_id}"; + $fullurl .= "&sessionId=$self->{session_id}"; } print "---> Requesting $fullurl\n" if $self->{verbose}; # We use the full version of LWP to make sure we issue an # HTTP 1.1 request (SRC-25) - my $ua = LWP::UserAgent->new; - my $header = HTTP::Headers->new( Content_Type => 'application/x-www-form-urlencoded; charset=utf-8' ); - my $response = $ua->request( HTTP::Request->new( 'POST', $fullurl, $header, $content ) ); + + my $ua = $self->ua; + my $response = $ua->request( HTTP::Request->new(GET => $fullurl) ); my $result; if ($response->is_success) { $result = $response->content; ================================================== I could not guess the reason it was changed back like this, so if it's unintended changes, I wish it be fixed to use POST again. For information, our Perl version is v5.8.2, and OS is Linux (CentOS 5.2). Thank you. -- So Matsui <matsui@shanon.co.jp> Shanon, Inc.
Download (untitled) / with headers
text/plain 211b
I just pushed 1.23 to CPAN. This fix restores the default to be HTTP POST. It adds a http_method option to fall back to GET. Thank you for pointing this out. Please let me know if you have any problems. Luke
Subject: Re: [rt.cpan.org #61019] The module doesn't use POST to send request to Selenium server (since ver. 1.20)
Date: Tue, 7 Sep 2010 20:31:48 +0900
To: bug-Test-WWW-Selenium [...] rt.cpan.org
From: So Matsui <matsui [...] shanon.co.jp>
Download (untitled) / with headers
text/plain 549b
Thank you for your quick response. It seems fine on my environment as I use ver 1.23 in my script. Thanks a lot ! On Sun, Sep 5, 2010 at 4:46 PM, Luke Closs via RT <bug-Test-WWW-Selenium@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=61019 > > > I just pushed 1.23 to CPAN. > > This fix restores the default to be HTTP POST. It adds a http_method option to fall back to GET. > > Thank you for pointing this out. > > Please let me know if you have any problems. > > Luke >
-- So Matsui <matsui@shanon.co.jp> Shanon, Inc.
Subject: Re: [rt.cpan.org #61019] The module doesn't use POST to send request to Selenium server (since ver. 1.20)
Date: Tue, 7 Sep 2010 20:44:49 +0900
To: bug-Test-WWW-Selenium [...] rt.cpan.org
From: So Matsui <matsui [...] shanon.co.jp>
Download (untitled) / with headers
text/plain 845b
Oops, I didn't mean to change the status of the bug ... I just wanted to add a comment. Sorry, but I don't know how to change it back ... On Tue, Sep 7, 2010 at 8:31 PM, So Matsui <matsui@shanon.co.jp> wrote: Show quoted text
> Thank you for your quick response. > It seems fine on my environment as I use ver 1.23 in my script. > > Thanks a lot ! > > On Sun, Sep 5, 2010 at 4:46 PM, Luke Closs via RT > <bug-Test-WWW-Selenium@rt.cpan.org> wrote:
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=61019 > >> >> I just pushed 1.23 to CPAN. >> >> This fix restores the default to be HTTP POST. It adds a http_method option to fall back to GET. >> >> Thank you for pointing this out. >> >> Please let me know if you have any problems. >> >> Luke >>
> > > -- > So Matsui <matsui@shanon.co.jp> > Shanon, Inc. >
-- So Matsui <matsui@shanon.co.jp> Shanon, Inc.
Accidentally re-opened.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.