Jmeter Post URL with colon - jmeter

I have a form action that calls the following url :
https://someurl:jsessionid=0000000
The form works.
When trying to mimic it in Jmeter the http request
if I call that url, the server will return that the url does not exists (because the :jsessionid....)
Is there anyway to mimic a form with this kind of url?
Thanks a lot in advance!.

Based on HTML URL Encoding Reference, colon (:) can be replaced with %3A. So, you can try this in your HTTP Request:
I hope this will work for you.

I think you URL is not correct as colon in URLs can be used only in 2 cases:
As a part of URL scheme, i.e. in the end of http: or https: protocol
As a separator between username and password when basic HTTP authentication is used like http://username:password#server/path
If you passing JSESSIONID as a parameter - semicolon ; should be used so please double check the character. If it something coming from the server - raise an issue as colon is not the right separator. If it is something introduced by you - you need to change the colon to semicolon.Normally you should be using either HTTP URL Re-writing Modifier or HTTP Cookie Manager to correlate the JSESSIONID cookie.

Related

java.lang.IllegalArgumentException with value {3D} in URL query

My Get Request has query value {3D} in the url when i make request using this it throws java.lang.IllegalArgumentException same request works fine in browser and postman
I tried to provide sample URL for debugging by there is no URl with it
You cannot have either { or } in the URL path section without encoding so the options are in:
Use __urlencode() function like:
${__urlencode({3D})}
Or put your query under "Parameters" tab of the HTTP Request and tick URL Encode? box
In general if the request works in browser or postman you can just record the request using JMeter's HTTP(S) Test Script Recorder
Instructions for browser
Instructions for postman
In query you need to encode the {} signs, send instead encoded value:
%7BD%7D
Or use urlencode function
${__urlencode({D})}

Warning status issue in jmeter result table

I have to do load testing for a web based application. I am getting status as warning the results table. My request contains the URL and the path as /. I have passed username and password in the parameters section. Even after tried many times still it shows status as warning.
I have also tried using Proxyserver address, port, user name and password ...still no luck..
Please help me on this.
If you get a Warning status, this means that JMeter detected a response code > 399.
There can be a lot of reasons for this, examples:
Wrong URL : 404
Error : 500
To have more details on it, add a View Results Tree and inspect all tabs to see:
Request : What you are sending (headers / Cookies / body)
Response : What you are getting (headers / Cookies / body)
Then fix your HTTP request by comparing request in browser with what you have build.
Alternatively, use JMeter recording feature.
To see all ways to debug a script, have a look at this book where sample chapter explains lot of ways.
If you get warning status that means your entered URL contains https:// part which means your given URL working with HTTP protocol.
Remove https:// part from
- HTTP Request Defaults
- HTTP Request
So replace https:// part by WWW and try again

Accessing HTTP headers in ISAPI Rewrite 3

Is there any way to access HTTP headers in ISAPI_Rewrite module? Didn't find anything about it. I know IIS URL Rewrite allows you to access headers as server variables - {HTTP_HEADER_NAME} - is there something similar here?
Uh, nevermind...
Missed a line in a documentation:
HTTP header value with the syntax %{HTTP:header}.
http://www.helicontech.com/isapi_rewrite/doc/RewriteCond.htm

What is difference between Response.Redirect("http://url") and Response.Write("REDIRECT=http://url")?

I'm working on ASP.NET MVC3 with C#.
What is difference between Response.Redirect("http://www.google.com"); and Response.Write("REDIRECT=http://www.google.com");?
The difference is that the first will replace the response with a redirection page and end the execution, while the second will just write the text to the response stream and continue with creating the rest of the page.
Response.Redirect() sets an HTTP 302 header along with the URL to be redirected to.
Response.Write("REDIRECT=http://www.google.com"); will write that string to the response body, as in that redirect text would be appended to the HTML of your web page.
This will create the correct full HTTP Header for you:
Response.Redirect("http://www.google.com");
You have the ability to set or change some paramters for the HTTP Header.
HttpResponse Class
e.g set HTTP Status Code 404 or 500 or in your case 302 for redirect.
e.g set the HTTP Mime-type for jpg
Will write into the Body in your response..like a string output
Response.Write("REDIRECT=http://www.google.com");
The methods in question are quite self explanatory :)
Response.Redirect("http://www.google.com");
The Redirect will redirect you to another page, in the case it will take you to Google's home page.
Response.Write("REDIRECT=http://www.google.com");
The Write method will write a string of text to the web page. In this case it will write the text "REDIRECT=http://www.google.com" to your web page.
Play around with these 2 methods in your web project and see what happens.

xhrPost : from an http view to an https url

using Dojo, is it possible to make an Ajax call using xhrPost from an HTTP view to a HTTPS url ?
The url must be HTTPS (as defined in Struts).
If I simply set "MyCommand" as the 'url' parameter of the xhrGet, I get a 302 error code.
If I transform "MyCommand" using javascript to something like "https://......./servlet/MyCommand" I see the following error in Firebug : "uncaught exception: Permission denied to call method XMLHttpRequest.open".
I'm stuck using both approaches, the only solution I found is to remove the "https" clause in the struts configuration file, and of course this is not a correct solution :)
Thanks for any help.
Best regards,
Nils
connection to https from http involves a different port of the target. This violates the same-origin policy which should be enforced by the browser to the running javascript code.
It should work with an iframe..
dojo.io.iframe encapsulates this behaviour for you
http://docs.dojocampus.org/dojo/io/iframe
If your server responds with a redirect to a non-ssl (correctly to same-origin) page you should be able to read the response (because the iframe is now in the same-origin).

Resources