News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

[img] problem

Started by Sir Osis of Liver, January 10, 2024, 12:40:33 PM

Previous topic - Next topic

shawnb61

...But you cannot properly test & diagnose without a modern browser.  I'm not sure we can rely on your tests.

You need to figure out why the proxy isn't working for you.  For all we know, it's actually working. 

Once you use a current browser, and if you then still cannot see the image with the proxy on, you should look at your console log, apache log & web access log for clues.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sir Osis of Liver

Proxy is enabled here.  Do you see the image?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

shawnb61

Quote from: shawnb61 on January 11, 2024, 05:02:13 PMOnce you use a current browser, and if you then still cannot see the image with the proxy on, you should look at your console log, apache log & web access log for clues.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sir Osis of Liver

FF 115 is a current browser.  Not the latest version, but it's less than a year old, they release updates every couple of months.  If I enable proxy on client site, images will not be viewable by many of the members.  Not everyone is using the latest versions of all hardware and software.  SMF should be able to accommodate a range of users with different browsers, and usually does.  This is the first time I've been presented with this problem.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

Quote from: Sir Osis of Liver on January 11, 2024, 05:04:38 PMProxy is enabled here.  Do you see the image?


No because the proxy.php requests give me a 404 response.

Sir Osis of Liver

I can see the posts on my desktop and tab, but images are missing.  Not getting 404.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sesquipedalian

Whether the posts give a 404 is distinct from whether the image gives a 404.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Sesquipedalian

1. What value is set in the "Maximum file size of images to cache" setting?

2. Post a copy of proxy.php from the affected forum, so that someone can check whether it has been messed up.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Aleksi "Lex" Kilpinen

#28
Quote from: Sir Osis of Liver on January 11, 2024, 04:41:37 PMWouldn't have any idea where to find the key, and I believe MS ended free upgrades quite some time ago.
Yes, that must have been a couple of months ago already.  ::) It really truly was available for free, for years if upgrading in place from Windows 7 or Windows 8 to Windows 10, and is currently available from Windows 10 to Windows 11, even if previously upgraded from Windows 7 or 8.

https://www.zdnet.com/article/its-official-no-more-free-windows-10-upgrades/
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Arantor

Quote from: Sir Osis of Liver on January 11, 2024, 09:34:46 PMI can see the posts on my desktop and tab, but images are missing.  Not getting 404.


And if you open the image directly in the browser do you get a 404 because that's what I did. I never said the *posts* gave me a 404, because they don't.

Sir Osis of Liver

If I link directly to the image using the posted url the image is displayed correctly -

http://www.carsntrucks4you.de/images/crackerbox/GMC Crackerbox_1.jpg

The url doesn't work here because it's truncated at the space.

There is no broken image icon on desktop, it's blank.  There is on tab but wouldn't have any idea how to use it (just use tab for e-reader).  Neither displays images with proxy enabled.


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

Yes, because proxy.php returns a 404, like I said.

Sir Osis of Liver

I'm seeing that in console, but it's a valid url.  If you link to it directly image loads.  And forum displays image (for me, anyway) if proxy is disabled.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

It's not a valid URL but never mind. It only works directly because the browser works around it for you - it's not legal in HTTP spec, hasn't even been if memory serves, because space is a restricted character.

The standard convention is to replace it with %20 exactly as my browser does before sending it off.

I'm not entirely sure why the proxy isn't doing that, but the behaviour it exhibits is otherwise actually correct - the space is not valid in the URL under any circumstances and standing there trying to say otherwise "because it works for you" is just irrelevant. It "works for you" the same way it works for me - the browser ignores what you tell it and corrects you.

It would be well within its rights to refuse you entirely.

If you were actually correct, Wikipedia wouldn't put underscores in all its URLs where there are spaces.

Sir Osis of Liver

So if I understand correctly, client would have to do two things to fix the problem:

- Advise members not to post links containing spaces (or other invalid characters).
- Enable image proxy to allow loading http images.

I've no way to test it, don't have an http site to store image.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

No-one should be posting links with spaces in BUT IF THEY DO the proxy should fix them the way the browser does, by replacing the space with %20 and fixing all the other exciting stuff in it with rawurlencode. The trick is to then manage to not *double* encode it when rewriting the link to have a link prefix.

This is ungodly difficult to do correctly which is why it doesn't work quite as it should because you have to fix the link, then fix the fix for the link because % is a special character, and then pray the webserver receiving it doesn't then try to be helpful and unwrap it one layer early.

Note that plenty of other systems don't like accepting URLs with spaces in for this exact reason, and the only reason the proxy even exists is because places aren't moving to HTTPS like they should already.

shawnb61

Just following up, I did confirm that the 2.0 proxy has an issue with http urls with embedded spaces, as SOoL reports.  2.1 works fine with the same URLs.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Advertisement: