Genero Web Client / GWC How To's |
HTML SUBMIT operations are used in HTML forms when a Genero Web Client (GWC) or Genero Desktop Client (GDC) application or a Genero Web Service (GWS) REST service requires additional parameter to start. In such cases, if one or more of the parameters can have spaces, use a POST operation instead of a GET operation.
When doing a HTML POST SUBMIT, the browser encodes parameters as application/x-www-form-urlencoded (blanks in request parameters are converted into '+' characters by the browser) which the dispatcher decodes correctly, because HTML POST SUBMIT are transformed into HTTP GET SUBMIT.
When doing a HTML GET SUBMIT, the browser encodes parameters as application/x-www-form-urlencoded. Because there is no mime-type in the HTTP layer, the dispatcher does not decode anything, and '+' characters are not decoded back into spaces. As a result, spaces during an HTML GET SUBMIT operation are not well transmitted to the final application, and each space appears as a '+' character.
When doing a HTTP GET request, the browser encodes query string parameters following RFC 1738. This means spaces become %20, but '+' chatacters are not encoded. Therefore, there is no way to distinguish a '+' character encoded due to HTML GET SUBMIT operation or a real character to be passed in query string of a HTTP GET URL.
If you have to transmit spaces with HTML SUBMIT, use the POST method.