jasonbio / reddit-shell

web based linux shell emulator that allows you to browse reddit via command line
https://redditshell.com/
GNU General Public License v3.0
432 stars 38 forks source link

Loading comments over HTTP instead of HTTPS #8

Closed emitchel closed 8 years ago

emitchel commented 8 years ago

Error retrieving comments over HTTP instead of HTTPS

asadw1 commented 8 years ago

I experienced similar issues. Was it error fetching data? On Jan 28, 2016 7:45 AM, "Elliot Mitchell" notifications@github.com wrote:

Error retrieving comments over HTTP instead of HTTPS

— Reply to this email directly or view it on GitHub https://github.com/jasonbio/reddit-shell/issues/8.

emitchel commented 8 years ago

image

Seems to be a simple fix

jasonbio commented 8 years ago

Weird, it should request everything over HTTPS by default.. wondering if maybe reddit was temporarily downgrading requests to HTTP. Can't reproduce right now anyways.

alminisl commented 8 years ago

I get the same issue when I want to load some Posts.

jasonbio commented 8 years ago

Can you please provide me with some console logs and network requests? Also what commands were you typing? I can't seem to replicate this myself so I'm having trouble figuring out what the problem is.

My only theory is that the "view comments" command is requesting "https://reddit.com/r/subreddit/comments/4dthkd/etc..." instead of "https://www.reddit.com/r/subreddit/comments/4dthkd/etc..." (missing the www) which seems to result in a 301 Moved Permanently response in certain cases and then forwards to "https://www.reddit.com/r/subreddit/comments/4dthkd/etc...". Not sure why the request would be downgraded after the 301 response, but it's possible I guess.

jasonbio commented 8 years ago

I addressed this issue in my latest commit - hopefully this helps 4323c5ee18c124f876a55e828126f0bd309bf229