spray.http.IllegalUriException: The path of an URI without authority must not begin with "//"
Related
i have an application gateway v2 standard with private ip and i have this use case:
on imperva we have this url myapp.mydomain.com with a redirect to www.mydomain.com/something/, this url is on an application gateway but i see that app gw put at the end the / . I would like to remove it to have www.mydomain.com/something, there is a way to remove it?
Thanks
I tried to reproduce the same in my environment I got the same URL like below:
Application gateway is used to make URL redirects, however one of the routing rules, which takes users to an external website, adds a trailing slash "/" at the end of the URL and causes problems to resolve this issue try the below step:
In your backend target try to disable the include path as NO like below:
When I try to pass the URL I got the result successfully like below:
If the password contains #, ImapMailReceiver failed to return host correctly.
for example:
username: abc#gmail.com
password: abc#123
host: imap.gmail.com
Final URI string
imap://abc#gmail.com:abc#123#imap.gmail.com:993/INBOX
then, ImapMailReceiver identify host as 123#imap.gmail.com
I checked this thread but I use JavaConfig way to create ImapMailReceiver where as the thread is about XML config way.
Any way to walk around of this issue?
Thanks!
UPDATE
Final URI string with encoding
imap://abc%40gmail.com:abc%40123#imap.gmail.com:993/INBOX
in this case, I got AuthenticationException.
May be above information help you to understand the problem.
UPDATE 1
above was an issue from Gmail. One need to enable LESS SECURE APP security option in Gmail to fix Authentication related issue.
RFC 1738 says:
Within the user and password field, any ":", "#", or "/" must be encoded.
I expect you already know how URL encoding works. If you want a refresher, page 18 of the same document is a good place to start.
I encountered the same problem with an Office 365 account, where the user name is like 'your-user#your-company.com' and the host is 'outlook.office365.com'. Without encoding the user name, 'your-company.com' is used as the host, which leads to the following (a bit misleading) error:
javax.mail.AuthenticationFailedException: failed to connect, no password specified?
Activating debugging with mail.debug=true ...
mailProps.put("mail.debug", "true");
receiver.setJavaMailProperties(mailProps);
... gives us the parameters used for the connection to the mail server.
DEBUG IMAPS: protocolConnect returning false, host = your-company.com, user = your-user, password = <null>
To resolve the issue, I used URLEncoder.encode for the username and password, e.g.:
...
new StringBuilder("imaps://")
.append(URLEncoder.encode(mailSettings.getUser(), StandardCharsets.UTF_8.toString()))
.append(":")
.append(URLEncoder.encode(mailSettings.getPassword(), StandardCharsets.UTF_8.toString()))
...
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.
how to make sign # can be use in the uri. When i try to send an Email address in the url this message came
An Error Was Encountered
The URI you submitted has disallowed characters.
please help
The allowed uri characters are defined in config.php
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-#';
I'm trying to test if a uri is valid (e.g. actually has content, not testing if it is well formed here) using ruby code, and I can open a uri using open(uri). But in my case, the uri is a link to a file to be downloaded and I don't want to have to download the whole file just to verify that there is content there.
Is there another solution for this?
Try this
require 'net/http'
u = URI.parse('http://www.example.com/')
status = Net::HTTP.start(u.host, u.port).head(u.request_uri).code
# status is HTTP status code
You'll need to use rescue to catch exception in case domain resolution fails.