We are launching a HP UFT test about the urls contained in a web application. We are trying to verify if the links are broken or not. We have a list of links stored in a excel file and we run a for loop to pass each urls to the function TestPageLinks. The following codes is out current function, but we are getting error "The URL does not use a recognized protocol." Anyone has ideas what may go wrong?
P.S We tried some urls hosted on public protocols like google.com and youtube.com and they all worked. But we have to make it work on the urls in our own web app.
Test Function:
Reporting:
The protocol of a link is the part before the ://.
http://example.com
https://google.com
ftp://somesite.com
Do your links include this part?
Related
hello I have a local wordpress installation, which is a copy of my hosted website.
i'm going to try to make it simple :
If i type "http://mylocalwebsite/index.php", it works and shows me my local copy
If i type "http://mylocalwebsite", index.php is still used, but i'm ending in my hosted web page (www.myrealsite.com)
If i type "http://mylocalwebsite" again, it doesn't use index.php, and directly opens my hosted website.
All hosts files are correct, none of them is leading to my hosted website.
I've done a search for "www.myrealwebsite.com" in the directories of the local copy : no result.
I just don't understand why. Any ideas ?
Thx
This is a cached redirect from the browser you are using (since the hostname you are using is not FQDN, the browser tries to correct that, or has previously seen a (301) redirect to the real webpage like from non-www hostname, to a www.hostname and uses that to assume what is correct).
If you try the same with CLI curl request, I would imagine the result will be as you expect.
I have a Qt app that I have inherited and have to support. There is a piece of code that generates a URL that looks like this:
http://foo.bar.com:8000/#/workitem/71327434512586907410/report
The page is then loaded with setUrl
On a Mac this works fine, but on Windows the page is not loaded, and I do not even see the request reach the server. I found this:
https://bugreports.qt.io/browse/QTWEBKIT-56
On the Mac where it works I do not see the # in the request that the server gets. But if I remove the # in the code, I get a 404.
So my questions are this:
What does the # mean in this context?
Why is it required for this URL to be recognized?
Why does it work on Mac and not on Windows? Is it that bug in the link?
The webserver is nginx, and the framework is falcon.
I have a bit more info on this.
When the URL contains the # I see in the nginx log this:
POST /workitem/67876029556368716590/report
And the request is successfully served.
But when the URL does not have the # I see this in the log:
GET /workitem/67876029556368716590
And that returns the 404.
Another update:
I have figured out that the # is a Angular JS routing thing:
AngularJS routing without the hash '#'
So now my only question is, is there a Qt bug that is preventing this from working in Windows.
'#' is an unsafe character and should be encoded.
All unsafe characters must always be encoded within a URL. For
example, the character "#" must be encoded within URLs even in
systems that do not normally deal with fragment or anchor
identifiers, so that if the URL is copied into another system that
does use them, it will not be necessary to change the URL encoding.
http://www.ietf.org/rfc/rfc1738.txt
This turned out to be a big red herring. I was able to modify the system so that I did not need the # in the URL and it still didn't work. Turned out the issue was that the code was trying to download jquery using SSL and it did not work on systems that did not have the SSL libs installed. I changed the code to download jquery from my server instead of the internet and it all worked.
As the title suggests, http://localhost/mywebapp is being automatically added to urls within my application.
User clicks an https hyperlink, but instead of browsing to
https://correcturl.something.com
it goes to http://localhost/mywebapp/https://correcturl.something.com
ie the localhost part is being automatically added. I'm sure there is an IIS setting that we are missing here.
It might not be IIS. If you're forming your URLs improperly, I'm pretty sure the browser will handle redirect to "current url" + "redirecting url".
example:
if you execute the following in a javascript console, you will not get redirected.
window.location.href = "/http://google.com";
Running that off stackoverflow page sends me to https://stackoverflow.com/http://google.com
which is incorrect.
I'm assuming that if you're testing urls in some dev environment locally, you'll produce a similar result against localhost. I can't give you a better answer without more information, however I would begin by looking for something in your app similar to what I described.
I am making an application with the Google Maps API. I want to be able to have one person on a computer, watch what another person has edited to a map. I am thinking of passing information of the map to a Google Fusion Table. The other person will be able to see everything as a layer. I would like for the program to just run from the user's browser and not build a website for it.
To edit the fusion tables, I need to gain access/tokens. I am currently trying to use these there JavaScript to accomplish this. ScriptSample.html, oauthWindow.html, and gwt-oauth2.js. This is the working example.
When I run them, I get am error that says the redirect URI is incorrect. It says the file I use to redirect does not have authority. My first obvious question is:
How do I give that file authority to redirect?
In my API console, I have it set up as a client-side web application. Should I change it to an installed application?
Currently I have the following settings:
my JavaScript origin is: https://localhost
redirect URI: https://localhost/oauthWindow.html
Thanks
There's no problem with using a localhost url for Dev work - obviously it needs to be changed when it comes to production.
You need to go here:
https://developers.google.com/accounts/docs/OAuth2
and then follow the link for the API Console - link's in the Basic Steps section. When you've filled out the new application form you'll be asked to provide a redirect Url. Put in the page you want to go to once access has been granted.
When forming the Google oAuth Url - you need to include the redirect url - it has to be an exact match or you'll have problems. It also needs to be UrlEncoded.
I cannot get the URL rewriting module to work on my local PC (vista x86)
i set up a new rule using the 'user friendly url' template.
a picture rather than 1000 words....
(the image contains 3 shots - creation, config and pattern test)
http://www.sk8loc8.com/rewriteIssue.jpg
so now that is setup if i request 'localhost/iisrewriteurl/content/5 i should see my content.aspx page.
nope...
Error Summary
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Detailed Error Information
Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL IISRewriteURL/content/5/
Physical Path C:\Users\Guy\Documents\Visual Studio 2008\Projects\IISRewriteURL\IISRewriteURL\content\5\
Logon Method Anonymous
Logon User Anonymous
When i go back into the rule itself and test the patterns that IIS made for me, they do not work..
I have tried adding a wildcard script map under the handler mappings section but this makes no difference.
Has anyone seen this type of behaviour before? Or am i missing something very simple?
If you test the pattern you dont need the Host
I always just create Blank Rules and not had a problem that way since not sure if it matters though. I cannot discover why that rewrite wouldnt work perhaps other rules are blocking it?
Alternatively you may have a look at Helicon Ape product that emulates Apache modules behavior on IIS7. It has simpler syntax and Helicon Ape Manager automatically checks the syntax of the rules you write.