config file question - passing username and password in URL_TEMPLATE
Status: Alpha
Brought to you by:
coroberti
From: <MM...@EM...> - 2013-11-14 15:53:25
|
Hello: I would like to use the curl-loarder for load testing of an XCAP server. The XCAP by nature has complicated URLs. In order to do a load test, I should be able to pass the username and password for basic authentication. I have the following configuration file ########### URL SECTION #################################### URL_TEMPLATE = http://%s:%s@10.10.10.1:8080/mobicents/%s/users/%s/index URL_TOKEN_FILE = put.tmpl # Path relative towards curl-loader URL_SHORT_NAME="PUT-file" REQUEST_TYPE=GET HEADER="Content-Type: application/resource-lists+xml" HEADER="Expect:" MULTIPART_FORM_DATA="file=@curl_rlist.xml" #UPLOAD_FILE=./curl_rlist.xml TIMER_URL_COMPLETION = 0 # In msec. When positive, Now it is enforced by cancelling url fetch on timeout TIMER_AFTER_URL_SLEEP =3000 WEB_AUTH_METHOD=DIGEST Put.tmpl: sip%3a%2B17034079662%40somedomain.com password resource-lists sip%3a%2B17034079662%40somedomain.com The curl-loader produced the following log Local port: 0 Connected to 10.10.10.1 (10.10.10.1) port 8080 (#0) Connected to 10.10.10.1 (10.10.10.1) port 8080 (#0) Server auth using Digest with user '' GET /mobicents/resource-lists/users/sip%3a%2B17034079662%40ims.voip.hrndva.rr.co m/index HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Host: 10.10.10.1:8080 Accept: */* Content-Type: application/resource-lists+xml 4 0 0 1 !! ERCL 401 HTTP/1.1 401 Unauthorized HTTP/1.1 401 Unauthorized Server: Apache-Coyote/1.1 X-Powered-By: Servlet 2.5; JBoss-5.0/JBossWeb-2.1 WWW-Authenticate: Digest nonce="e1b51fee0e03f44d3c4547a32c5b8497", realm="10.10.10.1", opaque="cc547cf3", qop="auth" Content-Length: 0 Date: Thu, 14 Nov 2013 15:19:52 GMT Connection #0 to host 10.10.10.1 left intact Issue another request to this URL: 'http://sip%3a%2B17034079662%40ims.voip.hrndva.rr.com:password@10.10.10.1:80 80/mobicents/resource-lists/users/sip%3a%2B17034079662%40ims.voip.hrndva.rr. com/index' Re-using existing connection! (#0) with host (nil) Connected to (nil) (10.10.10.1) port 8080 (#0) Server auth using Digest with user '' GET /mobicents/resource-lists/users/sip%3a%2B17034079662%40ims.voip.hrndva.rr.co m/index HTTP/1.1 Authorization: Digest username="", realm="10.10.10.1", nonce="e1b51fee0e03f44d3c4547a32c5b8497", uri="/mobicents/resource-lists/users/sip%3a%2B17034079662%4... 8 0 0 1 !! ERCL 403 HTTP/1.1 403 Forbidden HTTP/1.1 403 Forbidden Server: Apache-Coyote/1.1 X-Powered-By: Servlet 2.5; JBoss-5.0/JBossWeb-2.1 Content-Length: 0 Date: Thu, 14 Nov 2013 15:19:52 GMT Connection #0 to host (nil) left intact As can be seen the username is ignored from the URL during DIGEST authentication. Hence Authentication fails. |