Forms Test Http Method GET


 

Hidden sessionId

An easy form with two hidden fields sent to the server using the get method.
The first hidden field holds the constant 1
The second hidden field holds a sessionId

Identifying attribute name=form1

Attribute action=forms.asp

 

Select a color.
Select a size.
 

 

Result:

Two hidden fields:

  1. field f1 assigned the constant 1
  2. field session that holds a sessionid

Two select controls:

  1. field color assigned one value of (red white blue turquoise black forestgreen)
    Default is forestgreen.
  2. field size assigned one value of (small medium large xlarge)
    Default is xlarge

 

Build 625 problems:

  1. Controls, where the name attribute is not defined must not be sent to the server

Build 651 ok


Hidden sessionId and a hidden id string

Like the example above but this form contains a hidden field whose value changes after each submit.

Identifying attribute name=form2

Select a color.
Select a size.

 

Result:

Like the example above and a additional hidden field

  1. field uuid with a random string as value

Build 625 problems

  1. Reset Button recorded

 

Build 651 ok


One hidden field and two listboxes with multiple select enabled

This form doesn't define an action attribute.
Each attribute of the first listbox is assigned an ordinal number using the attribute value. The second listbox doesn't define any value attributes. The strings displayed have to be submitted instead.

The structure of this form:

<form>             <!-- no action attribute defined, no method attribute defined, no identifying attribute set -->
  hidden field
  text field
  <select multiple> <option value=1>Option1 ... </select>       <!-- values specified in the value attribte -->
  <select multiple> <option>Opt1 ... </select>                      <!-- no value attribute specified -->
</form>










Result:

  1. One hidden sessionid, name: session
  2. One textfield, name: text
  3. Listbox that has a value for each item predefined, name: multiselect
  4. A listbox that submits its displayed options, name: multiselect2

 Build 625 problems:

  1. As the form doesn't define the action attribute, recording fails

 

Build 651 ok

Build 652 nok
Form was submitted using WebPageUrl


Checkboxes and radiobuttons
Netscape - IExplorer 4.0 differences

<form name="form3" action="data2html3.asp">
    <input name="soho" value="12" disabled size="20">
    <input type="checkbox" name="Chkbox1" align="middle" checked value="ON"> 
    <input type="checkbox" name="Chkbox1" align="middle" value="ON">
    <input type="radio" name= "Rhon"value="Brugal&amp;<%=rndValue %>" +11>
    <input type="radio" name= "Rhon"value="Brugal&amp;<%=rndValue %>+22">
    <input type="radio" name= "Rhon"value="Brugal&amp;<%=rndValue %>+33" checked disabled>
    <input type="radio" name= "Rhon"value="Brugal&amp;<%=rndValue %>+44">
    <input type="submit" value="Ok">
</form>

 

Since IExplorer 4.0 the attribute disabled may be set for each control. Effect: The value of disabled controls won't be sent to the server. Netscape simply ignores the disabled attribute.

Identifying attribute name=form3

Result when using IExplorer 4.0

  1. The textfield can't be submitted
  2. The preselected item in the radio group can't be submitted

Result when using Netscape

  1. Everything can be submitted

Build 651 ok

Build 652 nok
WebPageUrl used instead of WebPageSubmit


Forms that should be ignored by the recorder

 

This form will be mailed to Kligor.T@Gee.whiz.com when submitted

<form action="mailto:Kligor.T@Gee.whiz.com" action="post" enctype= ".... >

 




 

 

The following form doesn't cause network traffic anyway.

<form action="javascript:for(i= 0; i < 10; i++) alert(it)>

  <input type="submit">
</form>

 


 

Result:

  1. Form of this type must not be added to the list of forms
  2. The contence must not be skipped because it may contain other embedded docs as well

Build 652 ok

 

 


Enctype=multipart/form-data, HTTP Method Get
Netscape and IExplorer handle this problem in a different way

<form action=data2html.asp enctype=multipart/form-data method=get name='malMultipart 1'> ?????
   <input type=file name=fname>
   <input type=hidden name=Pinguin value='sessionid'>
</form>

The attribute enctype specifies the content type when the value of 'method' is 'post'. Default is 'application/x-www-form-urlencoded'. Therefore, 'mulitpart/form-data' should only be used with method 'post' and an input control of type 'file'.
IExplorer and Netscape have different ways to solve this problem in conjunction with the 'get' method.

Identifying attribute name='malMultipart 1'

 

Result:

  1. Netscape ignores the 'get' method. Instead it uses method 'post' to send the file and all other controls using enctype 'mulitpart/form-data' for each.
  2. IExplorer ignores the enctype and uses the 'get' method to submit. The control of type 'file' will be treated like a control of type 'text'. The file itself won't be uploaded.
    The submitted query string looks something like: http://data2html.asp?fname= Absolute Path of the file&Pinguin=34556

Build 614:

Build 651 ok

Build 652 error:
When using netscape the formsubmit was recored with WebPageForm instead of WebPageSubmitBin


Enctype=multipart/form-data, HTTP Method Get
Netscape and IExplorer handle this problem in a different way

 

Same as above but no control defined where enctype 'multipart/form-data' would be useful.
Result: Same as above. Netscapes sends all controls using enctype 'multipart/form-data'. IExplorer ignores the enctype uses method 'get' instead.

 

<form action=data2html.asp enctype=mulitpart/form-data method=get name='malMulitpart 2'>
   <input name=someText value=ACTIVE_OPEN>
   <input type=submit value=Commit>
</form>

Identifying attribute name='malMultipart 2'

 

 

Result:

  1. Netscape always uses method post when it detects the enctype 'mulitpart/form-data'
  2. IExplorer prefers the method specified by the method attribute

Build 651 ok

Build 652 error
When using netscape recording the formsubmit was recorded with WebPageForm instead of WebPageSubmitBin


Wrong attribute enctype with input type 'file'

 

What happens if we have an input control of type 'file' and a false enctype?
Result: Netscape and IExplorer behave the same. Default enctype 'application/x-www-form-urlencoded' will be used with methods 'post' or 'get'.

 

The following two forms looks like:
<form action=data2html.asp enctype=multipart/kaputt-data method=get/post>

Identifying attribute name='malMultipart 3'

 


Identifying attribute name='malMultipart 4'


Build 651 ok

Build 652 ok


Forms with invalid method

 

Identifying attribute name=ConfusedForm1
Default enctype
Wrong http method

 

The form looks like:
<form action=data2html.asp method=submit>
   &lg;input type=file name=fname>
   etc...
</form>

 


 

Results:

  1. The wrong http method has to be substituted with method 'get'
  2. As enctype is default 'application/x-www.form-urlencoded' Netscape and IExplorer will submit the form using method 'get'.

Build 652 error:
WebPageUrl was used


Forms with invalid method

 

Identifying attribute name=ConfusedForm2
Mulitpart/form-data enctype
Wrong http method

 

The form looks like:
<form action=data2html.asp enctype=multipart/form-data method=submit>
   &lg;input type=file name=fname>
   etc...
</form>

 


 

Results:

  1. The wrong http method has to be substituted with method 'get'
  2. As enctype 'mulitpart/form-data' Netscape will post the form using enctype 'mulitpart/form-data'. IExplorer will use enctype 'application/x-www-urlenced' and method 'get'.

Build 651 ok

Build 652 errors:
When using netscape (uses in this examples method post by default) recording the upload fails
When using IExplorer (here by default method get), submitting was recorded with WebPageUrl


Parameters in query string and in the form block

 

Identifying attribute name=MixedParams
Value pairs attached to action string: id='random' tengo='random'
Value pairs in the form: cfm='random' quick='random'
No enctype and no method defined. Use default.

 

Theformlookslike:<br><formaction=data2html.asp?id='rndvalue'&tengo='rndValue'>
   <input name=cfml value='rndvalue'>
   etc...
</form>

 

 

Result:

  1. Value pairs 'id' and 'tengo' will be lost

Build 651 ok

Build 652 error
WebPageUrl was used

 

 


Form that only has hidden fields and one anonymous Submitbutton

 

The submit button below submits a form with four hidden fields.

Build 651 error.
Script couldnt be compiled

Build 652 ok