Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when sharing URL via shareviahttp, it is inappropriately encoded so it fails #63

Open
mnalis opened this issue Mar 10, 2021 · 1 comment

Comments

@mnalis
Copy link

mnalis commented Mar 10, 2021

Since redirect header Location: does not begin with protocol:// (like https://), it is assumed to be local file (with relative path in current directory) residing on same web server (your mobile phone). The result is that your web browser enters infinite redirect loop...

version is 2.0.8 from f-droid (latest, as newer ones cannot be built due to #56)

for example, sharing URL from mobile phone web browser results is:

--2021-03-10 12:01:08--  http://192.168.0.172:9999/
Connecting to 192.168.0.172:9999... connected.
HTTP request sent, awaiting response...
  HTTP/1.0 302 Moved Temporarily
  Date: Wed, 10 Mar 2021 12:01:10 GMT+01:00
  Connection: close
  Server: ShareViaHttp 2.0.8
  Location: https%3A%2F%2Fwww.bloomberg.com%2Fgraphics%2Fcovid-vaccine-tracker-global-distribution%2F%23global-time-series-rates
  Expires: Tue, 03 Jul 2001 06:00:00 GMT
  Cache-Control: no-store, no-cache, must-revalidate, max-age=0
  Cache-Control: post-check=0, pre-check=0
  Pragma: no-cache
Location: https%3A%2F%2Fwww.bloomberg.com%2Fgraphics%2Fcovid-vaccine-tracker-global-distribution%2F%23global-time-series-rates [following]
--2021-03-10 12:01:08--  http://192.168.0.172:9999/https%3A%2F%2Fwww.bloomberg.com%2Fgraphics%2Fcovid-vaccine-tracker-global-distribution%2F%23global-time-series-rates
Connecting to 192.168.0.172:9999... connected.
HTTP request sent, awaiting response...
  HTTP/1.0 302 Moved Temporarily
  Date: Wed, 10 Mar 2021 12:01:10 GMT+01:00
  Connection: close
  Server: ShareViaHttp 2.0.8
  Location: https%3A%2F%2Fwww.bloomberg.com%2Fgraphics%2Fcovid-vaccine-tracker-global-distribution%2F%23global-time-series-rates
  Expires: Tue, 03 Jul 2001 06:00:00 GMT
  Cache-Control: no-store, no-cache, must-revalidate, max-age=0
  Cache-Control: post-check=0, pre-check=0
  Pragma: no-cache

[...]
woheller69 added a commit to woheller69/shareviahttp that referenced this issue Oct 29, 2021
@woheller69
Copy link
Contributor

the problem seems to be the "%3A%2F%2F" stuff instead of "://"
The above commit should fix this because it does not encode URLs starting with "http" again.
Should I add it to the open PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants