Getting java.net.URISyntaxException: Illegal character in path at index 7: http:/$Bearer
I have an API name loginUser, which generates the authorization Token, that is to be passed in other subsequent APIs.
Below is the response:-
HTTP/1.1 200 OK
Date: Sat, 10 Nov 2018 07:08:45 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 71
Connection: keep-alive
Server: nginx/1.10.3 (Ubuntu)
X-Powered-By: Express
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: date, authorization, x-powered-by, connection, server, access-control-allow-origin, content-type, content-length, x-final-url
authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTgzMzcyNX0.3FRVpHm4EF2Ahzzy-OjbZ2EeZto6-hSFKHNtG5wcjBs
Where I want to fetch the authorization.
I'm using Regular Expression Extractor, but it is throwing below error (URISyntaxException: illegal character in the path)
Snapshots:-
Step_1
Step_4
I have seen couple of queries related to this Error but not in Jmeter,
And i tried using % also, to get rid out of this error, but that didn't work out.
Thanks in advance.
regex jmeter
add a comment |
I have an API name loginUser, which generates the authorization Token, that is to be passed in other subsequent APIs.
Below is the response:-
HTTP/1.1 200 OK
Date: Sat, 10 Nov 2018 07:08:45 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 71
Connection: keep-alive
Server: nginx/1.10.3 (Ubuntu)
X-Powered-By: Express
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: date, authorization, x-powered-by, connection, server, access-control-allow-origin, content-type, content-length, x-final-url
authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTgzMzcyNX0.3FRVpHm4EF2Ahzzy-OjbZ2EeZto6-hSFKHNtG5wcjBs
Where I want to fetch the authorization.
I'm using Regular Expression Extractor, but it is throwing below error (URISyntaxException: illegal character in the path)
Snapshots:-
Step_1
Step_4
I have seen couple of queries related to this Error but not in Jmeter,
And i tried using % also, to get rid out of this error, but that didn't work out.
Thanks in advance.
regex jmeter
add a comment |
I have an API name loginUser, which generates the authorization Token, that is to be passed in other subsequent APIs.
Below is the response:-
HTTP/1.1 200 OK
Date: Sat, 10 Nov 2018 07:08:45 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 71
Connection: keep-alive
Server: nginx/1.10.3 (Ubuntu)
X-Powered-By: Express
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: date, authorization, x-powered-by, connection, server, access-control-allow-origin, content-type, content-length, x-final-url
authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTgzMzcyNX0.3FRVpHm4EF2Ahzzy-OjbZ2EeZto6-hSFKHNtG5wcjBs
Where I want to fetch the authorization.
I'm using Regular Expression Extractor, but it is throwing below error (URISyntaxException: illegal character in the path)
Snapshots:-
Step_1
Step_4
I have seen couple of queries related to this Error but not in Jmeter,
And i tried using % also, to get rid out of this error, but that didn't work out.
Thanks in advance.
regex jmeter
I have an API name loginUser, which generates the authorization Token, that is to be passed in other subsequent APIs.
Below is the response:-
HTTP/1.1 200 OK
Date: Sat, 10 Nov 2018 07:08:45 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 71
Connection: keep-alive
Server: nginx/1.10.3 (Ubuntu)
X-Powered-By: Express
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: date, authorization, x-powered-by, connection, server, access-control-allow-origin, content-type, content-length, x-final-url
authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTgzMzcyNX0.3FRVpHm4EF2Ahzzy-OjbZ2EeZto6-hSFKHNtG5wcjBs
Where I want to fetch the authorization.
I'm using Regular Expression Extractor, but it is throwing below error (URISyntaxException: illegal character in the path)
Snapshots:-
Step_1
Step_4
I have seen couple of queries related to this Error but not in Jmeter,
And i tried using % also, to get rid out of this error, but that didn't work out.
Thanks in advance.
regex jmeter
regex jmeter
edited Nov 10 '18 at 14:46
user7294900
20.7k103258
20.7k103258
asked Nov 10 '18 at 7:45
shank
83
83
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Authorization is sent/receive in headers,
Change Step 2, Field to check should be Response Headers to get the value
Thanks for the answer, but after changing that i am getting below error in View Results Tree.
– shank
Nov 10 '18 at 14:18
org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: http:/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTg1ODc4NX0.KgwnC9UoYifFuBZO7opjKH2pQfM4k-_N_8McsUyRtMI at org.apache.http.impl.client.CloseableHttpClient.determineTarget(CloseableHttpClient.java:95)
– shank
Nov 10 '18 at 14:20
@shank Step 3 you might be to pass Bearer in HTTP Header of the request instead of its path
– user7294900
Nov 10 '18 at 14:45
Thanks again, now getting this below error:-
– shank
Nov 10 '18 at 16:24
java.net.MalformedURLException: unknown protocol: eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9.eyj1c2vyswqioiiyymeyyjc1my03nwewltqxngytywfioc0zzgy1m2i4ymiwmdeilcjpc0nvb2sionrydwusimlhdci6mtu0mtg2njk4nn0.182foo90hnmmbsdwjqxdo7_zwuefpnqzg0vlyfmgbom at java.net.URL.<init>(URL.java:421) at java.net.URL.<init>(URL.java:310)
– shank
Nov 10 '18 at 16:25
|
show 1 more comment
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53237006%2fgetting-java-net-urisyntaxexception-illegal-character-in-path-at-index-7-http%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Authorization is sent/receive in headers,
Change Step 2, Field to check should be Response Headers to get the value
Thanks for the answer, but after changing that i am getting below error in View Results Tree.
– shank
Nov 10 '18 at 14:18
org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: http:/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTg1ODc4NX0.KgwnC9UoYifFuBZO7opjKH2pQfM4k-_N_8McsUyRtMI at org.apache.http.impl.client.CloseableHttpClient.determineTarget(CloseableHttpClient.java:95)
– shank
Nov 10 '18 at 14:20
@shank Step 3 you might be to pass Bearer in HTTP Header of the request instead of its path
– user7294900
Nov 10 '18 at 14:45
Thanks again, now getting this below error:-
– shank
Nov 10 '18 at 16:24
java.net.MalformedURLException: unknown protocol: eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9.eyj1c2vyswqioiiyymeyyjc1my03nwewltqxngytywfioc0zzgy1m2i4ymiwmdeilcjpc0nvb2sionrydwusimlhdci6mtu0mtg2njk4nn0.182foo90hnmmbsdwjqxdo7_zwuefpnqzg0vlyfmgbom at java.net.URL.<init>(URL.java:421) at java.net.URL.<init>(URL.java:310)
– shank
Nov 10 '18 at 16:25
|
show 1 more comment
Authorization is sent/receive in headers,
Change Step 2, Field to check should be Response Headers to get the value
Thanks for the answer, but after changing that i am getting below error in View Results Tree.
– shank
Nov 10 '18 at 14:18
org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: http:/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTg1ODc4NX0.KgwnC9UoYifFuBZO7opjKH2pQfM4k-_N_8McsUyRtMI at org.apache.http.impl.client.CloseableHttpClient.determineTarget(CloseableHttpClient.java:95)
– shank
Nov 10 '18 at 14:20
@shank Step 3 you might be to pass Bearer in HTTP Header of the request instead of its path
– user7294900
Nov 10 '18 at 14:45
Thanks again, now getting this below error:-
– shank
Nov 10 '18 at 16:24
java.net.MalformedURLException: unknown protocol: eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9.eyj1c2vyswqioiiyymeyyjc1my03nwewltqxngytywfioc0zzgy1m2i4ymiwmdeilcjpc0nvb2sionrydwusimlhdci6mtu0mtg2njk4nn0.182foo90hnmmbsdwjqxdo7_zwuefpnqzg0vlyfmgbom at java.net.URL.<init>(URL.java:421) at java.net.URL.<init>(URL.java:310)
– shank
Nov 10 '18 at 16:25
|
show 1 more comment
Authorization is sent/receive in headers,
Change Step 2, Field to check should be Response Headers to get the value
Authorization is sent/receive in headers,
Change Step 2, Field to check should be Response Headers to get the value
answered Nov 10 '18 at 10:16
user7294900
20.7k103258
20.7k103258
Thanks for the answer, but after changing that i am getting below error in View Results Tree.
– shank
Nov 10 '18 at 14:18
org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: http:/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTg1ODc4NX0.KgwnC9UoYifFuBZO7opjKH2pQfM4k-_N_8McsUyRtMI at org.apache.http.impl.client.CloseableHttpClient.determineTarget(CloseableHttpClient.java:95)
– shank
Nov 10 '18 at 14:20
@shank Step 3 you might be to pass Bearer in HTTP Header of the request instead of its path
– user7294900
Nov 10 '18 at 14:45
Thanks again, now getting this below error:-
– shank
Nov 10 '18 at 16:24
java.net.MalformedURLException: unknown protocol: eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9.eyj1c2vyswqioiiyymeyyjc1my03nwewltqxngytywfioc0zzgy1m2i4ymiwmdeilcjpc0nvb2sionrydwusimlhdci6mtu0mtg2njk4nn0.182foo90hnmmbsdwjqxdo7_zwuefpnqzg0vlyfmgbom at java.net.URL.<init>(URL.java:421) at java.net.URL.<init>(URL.java:310)
– shank
Nov 10 '18 at 16:25
|
show 1 more comment
Thanks for the answer, but after changing that i am getting below error in View Results Tree.
– shank
Nov 10 '18 at 14:18
org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: http:/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTg1ODc4NX0.KgwnC9UoYifFuBZO7opjKH2pQfM4k-_N_8McsUyRtMI at org.apache.http.impl.client.CloseableHttpClient.determineTarget(CloseableHttpClient.java:95)
– shank
Nov 10 '18 at 14:20
@shank Step 3 you might be to pass Bearer in HTTP Header of the request instead of its path
– user7294900
Nov 10 '18 at 14:45
Thanks again, now getting this below error:-
– shank
Nov 10 '18 at 16:24
java.net.MalformedURLException: unknown protocol: eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9.eyj1c2vyswqioiiyymeyyjc1my03nwewltqxngytywfioc0zzgy1m2i4ymiwmdeilcjpc0nvb2sionrydwusimlhdci6mtu0mtg2njk4nn0.182foo90hnmmbsdwjqxdo7_zwuefpnqzg0vlyfmgbom at java.net.URL.<init>(URL.java:421) at java.net.URL.<init>(URL.java:310)
– shank
Nov 10 '18 at 16:25
Thanks for the answer, but after changing that i am getting below error in View Results Tree.
– shank
Nov 10 '18 at 14:18
Thanks for the answer, but after changing that i am getting below error in View Results Tree.
– shank
Nov 10 '18 at 14:18
org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: http:/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTg1ODc4NX0.KgwnC9UoYifFuBZO7opjKH2pQfM4k-_N_8McsUyRtMI at org.apache.http.impl.client.CloseableHttpClient.determineTarget(CloseableHttpClient.java:95)
– shank
Nov 10 '18 at 14:20
org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: http:/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIyYmEyYjc1My03NWEwLTQxNGYtYWFiOC0zZGY1M2I4YmIwMDEiLCJpc0Nvb2siOnRydWUsImlhdCI6MTU0MTg1ODc4NX0.KgwnC9UoYifFuBZO7opjKH2pQfM4k-_N_8McsUyRtMI at org.apache.http.impl.client.CloseableHttpClient.determineTarget(CloseableHttpClient.java:95)
– shank
Nov 10 '18 at 14:20
@shank Step 3 you might be to pass Bearer in HTTP Header of the request instead of its path
– user7294900
Nov 10 '18 at 14:45
@shank Step 3 you might be to pass Bearer in HTTP Header of the request instead of its path
– user7294900
Nov 10 '18 at 14:45
Thanks again, now getting this below error:-
– shank
Nov 10 '18 at 16:24
Thanks again, now getting this below error:-
– shank
Nov 10 '18 at 16:24
java.net.MalformedURLException: unknown protocol: eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9.eyj1c2vyswqioiiyymeyyjc1my03nwewltqxngytywfioc0zzgy1m2i4ymiwmdeilcjpc0nvb2sionrydwusimlhdci6mtu0mtg2njk4nn0.182foo90hnmmbsdwjqxdo7_zwuefpnqzg0vlyfmgbom at java.net.URL.<init>(URL.java:421) at java.net.URL.<init>(URL.java:310)
– shank
Nov 10 '18 at 16:25
java.net.MalformedURLException: unknown protocol: eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9.eyj1c2vyswqioiiyymeyyjc1my03nwewltqxngytywfioc0zzgy1m2i4ymiwmdeilcjpc0nvb2sionrydwusimlhdci6mtu0mtg2njk4nn0.182foo90hnmmbsdwjqxdo7_zwuefpnqzg0vlyfmgbom at java.net.URL.<init>(URL.java:421) at java.net.URL.<init>(URL.java:310)
– shank
Nov 10 '18 at 16:25
|
show 1 more comment
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53237006%2fgetting-java-net-urisyntaxexception-illegal-character-in-path-at-index-7-http%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown