views:

17

answers:

1

I am looking at a bug in WebSVN where when I get into a file log and click on compare, it looses the repository name as part of the request. The details are unimportant.

However, I've tracked down the bug to a http form that looks like this:

<form method="get" action="comp.php?repname=Binaries&amp;" id="compare">
  ....
  <input type="hidden" name="KEY" value="VALUE">

Is this supposed to work? Will both the "repname" argument, specified as part of the URL, and the hidden value be sent? It seems Chrome 4.1 only sends the hidden argument, and removes the repname parameter altogether. Is this correct?

I fixed it temporarily, pending more information, by adding another hidden field for repname with the same value, and now everything works, I'm just wondering if Chrome or WebSVN is in fault here.

+1  A: 

you should remove the &amp; from the end of the action value, that will likely just cause you trouble. if you need to pass an ampersand through, you should url-encode it as %26

edit: you should definitely do it the way you fixed it - by passing repname as another hidden variable - since some browsers do have weird behaviour when dealing with explicit and implicit url vars in a get :)

oedo
Ok, thanks, that confirms it. I'll see if I can't submit a bug on the WebSVN project for this. I am running with non-standard setup, so might not've been discovered.
Lasse V. Karlsen