URL not recognized after # character while using cy.visit('https://hostname/ui/#/path') where /path is excluded from the url.
Only 'https://hostname/ui/' is considered to open the browser.
Related
I have configured Zscaler NSS log forward to send logs on Linux server which is using ubuntu rsyslog service, I am able to receive logs, however, file name which getting generated it's with Special character, which is causing an issue to copy via script. Below is nss.conf file created under /etc/rsyslog.d/nss.conf
template(name="TmplMsg" type="list") {
constant(value="/rsys/log/client_logs/")
property(name="hostname")
constant(value="/")
property(name="programname" SecurePath="replace")
constant(value=".log")
}
template(name="TmplAuth" type="list") {
constant(value="/rsys/log/client_logs/")
property(name="hostname")
constant(value="/")
property(name="programname" SecurePath="replace")
constant(value=".log")
}
authpriv.* ?TmplAuth
*.info;mail.none;authpriv.none;cron.none ?TmplMsg
According to the templates doc, as well as securepath="replace", which replaces "/" in the property by "_", you can also use controlcharacters=. This can have one of 3 values:
"escape" to replace non-printing characters by #ddd (3 digit decimal value),
"drop" to remove them
or "space" to replace them by a space.
After i packaged apache to be portable (used any where), I had the surprise to get 403 error on AliasMatch but not on regular Location resources.
Update: I found the fix. Check answer.
And so, here is my own response.
I check the error.log and saw the path of the aliasmatch was wrong ( what a scoop). But note this path is made using a variable. Actually, all the character / that we can expect have been removed.
I look to the origin of the variable but not at the beginning, because all URI based on Location was working. Amazing ! But , the fact is, Location directive seems to convert the ugly \ windows in / to work, but not the AliasMatch directive. I forget to tell that i launched Apache using command line httpd with option -D and ... an ugly windows path with \ and not /. So, i convert the path in a pretty unix path and all is back in order.
In dos command : SET APACHE_ROOT="%THE_WINDOWS_PATH:\=/%"
I have tried unsuccessfully to open image file that it's name contains a space.
I use the following call:
WWW www = new WWW(url);
where:
url = "C:\Users\user\Documents\Files\Thumbnails\sample image.png";
A red question mark appears instead of image.
Also a 404 error appears when print www.error.
If I use another .png file without space (sampleimage.png), it works perfectly. On Windows and Editor it works nice too.
So I tried to replace the space with %20 but an error "can't load the file" appears.
I have also tried WWW.EscapeURL applied on the filename ... but nothing works.
Try to use verbatim string along with file:// prefix:
string filePrefix = #"file://";
string url = #"C:\Users\user\Documents\Files\Thumbnails\sample image.png";
Text file (filename: listing.txt) with names of files as its contents:
ace.pdf
123.pdf
hello.pdf
Wanted to download these files from url http://www.myurl.com/
In bash, tried to merged these together and download the files using wget eg:
http://www.myurl.com/ace.pdf
http://www.myurl.com/123.pdf
http://www.myurl.com/hello.pdf
Tried variations of the following but without success:
for i in $(cat listing.txt); do wget http://www.myurl.com/$i; done
No need to use cat and loop. You can use xargs for this:
xargs -I {} wget http://www.myurl.com/{} < listing.txt
Actually, wget has options which can avoid loops & external programs completely.
-i file
--input-file=file
Read URLs from a local or external file. If - is specified as file, URLs are read from the standard input. (Use ./- to read from a file literally named -.)
If this function is used, no URLs need be present on the command line. If there are URLs both on the command line and in an input file, those on the command lines will be the first ones to be retrieved. If --force-html
is not specified, then file should consist of a series of URLs, one per line.
However, if you specify --force-html, the document will be regarded as html. In that case you may have problems with relative links, which you can solve either by adding "<base href="url">" to the documents or by
specifying --base=url on the command line.
If the file is an external one, the document will be automatically treated as html if the Content-Type matches text/html. Furthermore, the file's location will be implicitly used as base href if none was specified.
-B URL
--base=URL
Resolves relative links using URL as the point of reference, when reading links from an HTML file specified via the -i/--input-file option (together with --force-html, or when the input file was fetched remotely from a
server describing it as HTML). This is equivalent to the presence of a "BASE" tag in the HTML input file, with URL as the value for the "href" attribute.
For instance, if you specify http://foo/bar/a.html for URL, and Wget reads ../baz/b.html from the input file, it would be resolved to http://foo/baz/b.html.
Thus,
$ cat listing.txt
ace.pdf
123.pdf
hello.pdf
$ wget -B http://www.myurl.com/ -i listing.txt
This will download all the 3 files.
I am looking for a tweak, addon or a fix to let me open local uri or urls without the file:/// prefix (like in IE or Chrome)
Example:
c:/folder/file.txt
It works if I change the forward slash to backslash, but it I need it like the example, or a fix to treat both slashes the same in Firefox.