Preserve fragment when redirecting from http to https
ClosedPublic

Authored by guoci on Feb 27 2018, 9:31 PM.

Details

Summary

Currently, a HTTP to HTTPS redirect removes the fragment if we have the following options set:
In Default Applications -> Web Browser
"Open http and https URLs"
to
"in an application based on the contents of the URL".

Running the command
kde-open5 http://en.wikipedia.org/wiki/URL#Syntax
sends the URL
https://en.wikipedia.org/wiki/URL
to the browser.

Diff Detail

Repository
R241 KIO
Lint
Lint Skipped
Unit
Unit Tests Skipped
guoci created this revision.Feb 27 2018, 9:31 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 27 2018, 9:31 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
guoci requested review of this revision.Feb 27 2018, 9:31 PM
guoci edited the summary of this revision. (Show Details)Mar 1 2018, 5:36 PM
ngraham added a subscriber: ngraham.Mar 1 2018, 5:59 PM

Even without the patch, kde-open5 http://en.wikipedia.org/wiki/URL#Syntax opens my web browser with that URL with KDE Frameworks 5.43 and git master. What am I missing here?

Even without the patch, kde-open5 http://en.wikipedia.org/wiki/URL#Syntax opens my web browser with that URL with KDE Frameworks 5.43 and git master. What am I missing here?

Maybe your browser is doing 'http' -> 'https' for you. Or wikipedia does it.

guoci added a comment.Mar 1 2018, 7:13 PM

Even without the patch, kde-open5 http://en.wikipedia.org/wiki/URL#Syntax opens my web browser with that URL with KDE Frameworks 5.43 and git master. What am I missing here?

Maybe your browser is doing 'http' -> 'https' for you. Or wikipedia does it.

I have 2 KDE machines, one has this behavior, the other doesn't.
While investigating the inconsistencies, I have found a way to reproduce it.

In Default Applications -> Web Browser, set
"Open http and https URLs"
to
"in an application based on the contents of the URL".

We can avoid this lost fragment behavior by setting that option to
"in the following application"
or
"with the following command"

guoci edited the summary of this revision. (Show Details)Mar 1 2018, 7:22 PM
dfaure accepted this revision.Mar 3 2018, 10:04 AM
dfaure added a subscriber: dfaure.

Makes sense to me.

This revision is now accepted and ready to land.Mar 3 2018, 10:04 AM
aacid closed this revision.May 20 2018, 10:01 PM
Restricted Application edited subscribers, added: kde-frameworks-devel; removed: Frameworks. · View Herald TranscriptMay 20 2018, 10:01 PM