It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
high rated
avatar
adaliabooks: So it could be to do with your server.. or possibly the fact you aren't on HTTPS?
avatar
mrkgnao: Can you explain what you mean by "aren't on HTTPS"?
MaGog is able to read https URLs (e.g. https://www.gog.com/games/ajax/filtered?mediaType=game&page=1&sort=title ). She just get cookieless data. Can one read https URLs without being "on HTTPS"?
Also she has no problem logging in to GOG and accessing my library, all of which is https.
It's just that damn gog_lc cookie which doesn't cross the HTTPS barrier.
Your server's pages aren't encrypted, presumably your request is coming from an unencrypted page (on plain HTTP) and it's possible GoG doesn't like the cookie set by an unencrypted page to be used for an encrypted one.
Being able to access HTTPS pages shouldn't be affected by whether you're on HTTPS or not, but what you can do might...

Let me test this by trying my script from a plain HTTP url.

avatar
mrkgnao: Thank you for your offer to serve as a proxy, but it's not practical. We are talking about many hundreds of pages read every six hours (and many thousands on Saturday).
Yeah, I thought that would be the case. My bandwidth is unlimited... but I seem to already be at 1.12GB of usage (must be the Legacy Library Images and stuff), so I'm not sure how 'unlimited' it is.
I'm still willing to at least try it.

No, never mind. I disabled the HTTPS redirect and tried on plain HTTP and it still worked so I don't think that's the issue.
Post edited March 16, 2016 by adaliabooks
New page pop.
Post edited March 16, 2016 by mrkgnao
high rated
I'm not sure what else to suggest.. the idea clearly works as I can do it, but there must be something stopping it from working for you.
Sorry I can't be of more help.
avatar
adaliabooks: I'm not sure what else to suggest.. the idea clearly works as I can do it, but there must be something stopping it from working for you.
Sorry I can't be of more help.
Thanks for trying. I'll think some more about it tonight.
high rated
avatar
adaliabooks: I'm not sure what else to suggest.. the idea clearly works as I can do it, but there must be something stopping it from working for you.
Sorry I can't be of more help.
avatar
mrkgnao: Thanks for trying. I'll think some more about it tonight.
No problem :)

I don't know if using PHP is an option (even just to host the bit I've written yourself and call that instead of the GoG page) to see if that works. I imagine it's more likely to be something other than the language used but that might be worth a try too..
avatar
mrkgnao: I'll think some more about it tonight.
Quick question, what happens if you don't have a cookie and attempt to read the data? Shouldn't said cookie be created then? Can't you check the automatically created one with the one you manually set, to see if there are any differences?
avatar
JMich: Quick question, what happens if you don't have a cookie and attempt to read the data? Shouldn't said cookie be created then? Can't you check the automatically created one with the one you manually set, to see if there are any differences?
Sorry for butting in, but think this was already answered?
avatar
mrkgnao: - Moreover, if I do not set the cookie at all, the jar remains empty, i.e. no default cookie arrives from GOG.
avatar
JMich: Quick question, what happens if you don't have a cookie and attempt to read the data? Shouldn't said cookie be created then? Can't you check the automatically created one with the one you manually set, to see if there are any differences?
avatar
Cavalary: Sorry for butting in, but think this was already answered?
avatar
mrkgnao: - Moreover, if I do not set the cookie at all, the jar remains empty, i.e. no default cookie arrives from GOG.
avatar
Cavalary:
True, I think I read that, but wasn't sure.
So, part 2 of the quick question, could it be a permission issue, that for whatever reason the script cannot write/modify the cookies in that location?
high rated
avatar
Johny.: Try to set $secure to true. Plus - get the cookie after setting it to debug what you have there.
avatar
mrkgnao: Did both already.

- Setting $secure didn't change a thing. All it is supposed to do is, if set, prevent sending the cookie on http. If clear, it sends on both http and https.
- Throughout, the cookie remains unaffected. Before and after the get it is, for example:
"Set-Cookie3: gog_lc=US_USD_en; path="/"; domain=.gog.com; port=80; expires="2016-03-17 01:22:03Z"; version=0"
- Moreover, if I do not set the cookie at all, the jar remains empty, i.e. no default cookie arrives from GOG.

All in all, it appears as if the cookie channel is broken in both directions.

P.S. Already tested with https and http.

P.P.S. The endpoint you posted is for changing currency, which I don't need. Is there one for changing country?
Shouldn't the port be 443 rather than 80 for https?
high rated
avatar
JMich: True, I think I read that, but wasn't sure.
So, part 2 of the quick question, could it be a permission issue, that for whatever reason the script cannot write/modify the cookies in that location?
Yes. As Cavalary quoted, no cookie arrives from GOG.
I'm not sure what location you are referring to. It's all done in RAM.
And remember the code has been working fine for a year without any change on my part, whereas yesterday, AFAIU, GOG enforced HTTPS throughout, so it's most likely HTTPS related.
avatar
Ghorin: Shouldn't the port be 443 rather than 80 for https?
I'll definitely try it tonight. Thanks.
Post edited March 16, 2016 by mrkgnao
avatar
mrkgnao: I'm not sure what location you are referring to. It's all done in RAM.
I was under the impression that the cookie had to be located on the disk for it to be used, thus the permissions question. No idea then :/
high rated
avatar
Ghorin: Shouldn't the port be 443 rather than 80 for https?
You were absolutely right!
I don't think I would have ever guessed it. You don't know how happy you've made me.
Thank you so much.

P.S. If I may be so bold as to suggest that you reveal your wishlist for a few hours, so I could also express my appreciation in a more concrete manner...
Post edited March 17, 2016 by mrkgnao
avatar
Ghorin: Shouldn't the port be 443 rather than 80 for https?
Ghorin na prezydenta. :)
Post edited March 17, 2016 by Johny.
high rated
avatar
mrkgnao: You were absolutely right!
I don't think I would have ever guessed it. You don't know how happy you've made me.
Thank you so much.

P.S. If I may be so bold as to suggest that you reveal your wishlist for a few hours, so I could also express my appreciation in a more concrete manner...
Great!
Well done Ghorin, nice catch :)

It's always something simple... half my bugs are due to typos or forgetting little obvious things.
I'll keep the port thing in mind for future reference though :)
high rated
avatar
Ghorin: Shouldn't the port be 443 rather than 80 for https?
Clap clap! You saved Magog :D