Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

RC 1.0.3. sends HEAD before GET on get queries #462

Closed
lukeis opened this issue Mar 2, 2016 · 13 comments
Closed

RC 1.0.3. sends HEAD before GET on get queries #462

lukeis opened this issue Mar 2, 2016 · 13 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 2, 2016

Originally reported on Google Code with ID 462

What steps will reproduce the problem?
1. Execute RC script that will access a CGI (GET Query) page.
2. Examine AUT server logs.
3.

What is the expected output? What do you see instead?
It should not send HEAD before GET, especially on query requests.

What version of the product are you using? On what operating system?
1.0.3

Please provide any additional information below.
This is new behaviour in 1.0.3. It does not occur in 1.0.1.

Reported by keithdtyler on 2010-04-13 02:28:00

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

it look like selenium.open sends HEAD before GET,
did a simple test and took a sniffer with it:
[Test]
public void SimpleOpen()
{
  selenium.Open("/");
}
sniffer:
HEAD / HTTP/1.1
Host: www.google.com .....
than
GET / HTTP/1.1
Host: www.google.com
- please make this priority higher since some of our request do not accept HEAD, this
make our tests fail.

Reported by lior.grinfeld on 2010-04-14 05:49:28

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

This is a serious limitation for us from moving to 1.0.3 because we have a feature in
our AUT that changes behavior on the second time an idential CGI URL is requested.
The HEAD is seen as the first request and the subsequent GET is seen as the second
request -- therefore under 1.0.3 we cannot possibly test the initial state behavior
because when we do get the content back it is already in the second state.

Again, 1.0.1 does NOT do this -- this is an undocumented and undesirable change in
behavior in 1.0.3.

Considering there appear to be known issues creeping up with RC1.0.1 and FF3.6 it is
really problematic to be stuck between these two situations.

Reported by keithdtyler on 2010-04-16 19:05:58

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I believe we are also affected by the same problem. Our application redirects on
sign-on. On 1.0.3, we are seeing selenium duplicating the requests on redirect. Our
application does not handle duplicate requests well (I won't go into the details).


This problem in RC 1.0.3 is preventing us from upgrading to Selenium Grid 1.0.5 (or
later) because Selenium Grid 1.0.5 contains RC 1.0.3.

Are there any plans to address this?

Reported by paulo.schneider on 2010-04-30 15:54:22

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

A couple of nice workarounds are posted on
http://groups.google.com/group/selenium-users/browse_thread/thread/a72e4df5a2fc8d7d#

Sending a second string argument of "true" to open calls is one of them.  It solved
my problem very nicely.

Reported by maryann.maypumphrey on 2010-05-07 17:33:17

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

As mentioned in comment 5, this is by design. Passing "true" as the second parameter
to open will disable this behaviour. Marking as WontFix, because this is working as
intended.

Reported by simon.m.stewart on 2011-01-26 09:03:48

  • Status changed: WontFix

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Can the workaround from comment 5 be used with selenium remote control? I am using selenium-remote-control-1.0.3\selenium-dotnet-client-driver-1.0.1,
where the Open method only accepts a single parameter, the url. 

Reported by computeruser.google@lr78.com on 2011-01-26 14:02:13

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I am also using the dot net RC client and, as a matter of fact, the 'Open' method takes
the url as its _single_ parameter.  Consequently, the solution mentioned in comment
5 cannot be applied.  

It seems that, if this behaivour is "by design", then  a corresponding method in the
ISelenium interface allowing to  pass the second boolean argument in order to prevent
the HEAD request before the GET is missing.  As this issue has been (in my opinion,
erroneously) marked as closed, I wonder if a new bug report should be opened.

Reported by antartic.albatross on 2011-01-27 12:04:40

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I agree wit the previous comment, this is a bug - just in RC.
When I hit that problem, I worked-around it on the Apache level:
http://techblog.zabuchy.net/2010/how-to-block-http-requests-for-specific-method

Reported by nexor1984 on 2011-02-03 22:09:35

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Hi there.  Unfortunately, your workaround assumes that one can modify the server config,
which may not be case always (particularly, in our case). 

I have created a new ticket (Issue 1268) so this matter can be reconsidered by the
dev team.

Reported by antartic.albatross on 2011-02-04 09:17:24

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Issue 1268 has been merged into this issue.

Reported by theautomatedtester on 2011-02-09 21:43:04

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

If this is intended behaviour have you any suggestions for clients which do not allow
the extra parameter?

Reported by krichards.uk on 2011-06-30 20:05:33

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Clients that don't support the extra parameter should be updated. Which clients are
you thinking of?

Reported by simonstewart@google.com on 2011-07-02 13:54:28

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by luke.semerau on 2015-09-17 17:48:58

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 2, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant