Issue Details (XML | Word | Printable)

Key: SRC-132
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Nelson Sproul
Reporter: Balint Reczey
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Selenium Remote Control

HTTP GET *.jar is proxied as HTTP POST *.jar

Created: 09/Oct/06 03:22 PM   Updated: 18/Nov/08 11:50 AM   Resolved: 30/Oct/07 03:38 PM
Component/s: Server
Affects Version/s: 0.9.0
Fix Version/s: 0.9.2

Environment:
Debian Etch
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
Mozilla Firefox 1.5.0.7


 Description  « Hide

It seems that the Selenium proxy forwards the GET operations from the browser as POST operations when the browser downloads a Java applet jar file if -proxyInjectionMode is used.



Sort Order: Ascending order - Click to sort in descending order
Dan Fabulich added a comment - 21/Aug/07 09:40 PM

In fact, this happens all the time if you use the Selenium proxy; since we now alwaysProxy by default, this happens quite frequently.

The problem is that ProxyHandler.java assumes that if the browser's HTTP request includes a Content-Type header, then the browser's request must therefore contain content. In that case, ProxyHandler forcibly changes the method to POST.

(For some unknowable reason, the browser JRE plugin passes a Content-Type on its jar GET requests; this is semantically incorrect, unless the browser is trying to send a JAR to the server in the body of a GET request!)

Anyway, I've checked in a fix in RC revision 1939 to address this case. Now we assume that a GET request has no body, even if the GET request includes a Content-Type header.

In investigating this problem I found and fixed SRC-326, which is a much more serious problem that would totally break applets. I suspect that SRC-132 may have been misdiagnosed as the cause of more general problems with applets, since doing an empty POST seemed not to harm anything; anyway, applets seem to work better now in PI mode. My test case was
http://java.sun.com/docs/books/tutorial/uiswing/components/applet.html. (Don't forget to clear your Java cache using the Java Control Panel before attempting to test this fix.)


Dan Fabulich added a comment - 30/Oct/07 03:38 PM

Oops, forgot to mark this closed. This was fixed for 0.9.2 in rc revision 1939.