Skip to content

Commit

Permalink
use 443 (HTTPS) port when testing help URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Dec 11, 2017
1 parent 1c6ba55 commit 678758c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/qgshelp.cpp
Expand Up @@ -152,7 +152,7 @@ bool QgsHelp::urlExists( const QString &url )
socket.setProxy( proxy );
}

socket.connectToHost( helpUrl.host(), 80 );
socket.connectToHost( helpUrl.host(), 443 );
if ( socket.waitForConnected() )
{
socket.write( "HEAD " + helpUrl.path().toUtf8() + " HTTP/1.1\r\n"
Expand Down

1 comment on commit 678758c

@rduivenvoorde
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexbruy I know this was one of my own suggestions, but... this does not work.
you will never open the right page.

Apparently connecting to a 443 socket without any ssl stuff just returns a bad request:

"<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</hea..."

So maybe it is better to keep the http url and port 80, then redirection should do the work
We could use the httpS url and port 80 too, but that is a little unclear.

OR forget this whole test, and do the 'nothing found' magic somewhere in the website.

I was thinking about pointing to the search page of the (english?) version:
https://docs.qgis.org/testing/en/search.html

Please sign in to comment.