generated script mishandles multi-valued request parameters
Bill Smith <[email protected]> Tue, 3 Apr 2012 22:22:03 -0500
| Newsgroups | gmane.comp.java.grinder.devel |
|---|---|
| Message-ID | <CAKyDFRxhkQ7fxq1ObgVKMhijzaX4TihCZN9Gxr_TR2N=s_UkgQ@mail.gmail.com> |
My app has a form post with a multi-valued parameter The generated Clojure
script erroneously uses the same value for all instances of the parameter.
See for example the references to *token_login2* in the script fragment
below:
; Worker thread state is stored in a map using a dynamic var.
(def ^:dynamic *tokens*)
(defn set-token [k v] (set! *tokens* (assoc *tokens* k v)))
(defn token [k] (*tokens* k))
[...]
(defpage page4 "POST login (requests 401-408)." (Test. 400 "Page 4") []
(set-token :token_login2 "Login")
(set-token :token_login2 "")
(set-token :token__sourcePage
"HQduFOCJZk6Fw7gPHLMv3_9ey7vdLQ8IuRf--7h2p03EenTfDNNtuw==")
(set-token :token___fp "RbQxcD5ZA1A=")
; Expecting 302 'Found'
(.POST request401 "/t/a/login"
(nvpairs [
"__session_id__" (token :token___session_id__)
"operator.password", "XXXXXXXX"
"login2" (token :token_login2)
"targetURL" (token :token_targetURL)
"operator.username" (token :token_operatorusername)
"login2" (token :token_login2)
"_sourcePage" (token :token__sourcePage)
"__fp" (token :token___fp)])
(nvpairs [
"Content-Type", "application/x-www-form-urlencoded"]))
(.sleep grinder 12)
In the above example, the body of the form post should contain two values
for "login2": the string "Login" and the empty string "". Instead, both
instances will be the empty string.
Observed using the Grinder 3.9 snapshot, Sun Java 1.6.0_26, and Firefox 11.
Bill Smith
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Grinder-development mailing list
Grinder-development-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/grinder-development