400 Bad Request errors on a MediaWiki configured to use images from Wikimedia Commons

First of all, I’m using nginx 0.8.45 and have a wiki on my website
that’s configured to use images off of Wikimedia Commons. It saves the
images onto my server and updates them at regular intervals. Most of
these images show up fine, however, images that contain in their names
things like % or anyother characters that aren’t used often in file
names give 400 Bad Request errors. Here’s an example of what I’m taking
about:
http://urcreative.hobby-site.com/wiki/images/thumb/3/34/25%.svg/9px-25%.svg.png

Its really annoying and if anyone has a fix for this problem, please
tell me.


omega13a
Owner and Founder of UFT
http://www.fedtrek.com

Hi Omega13a :wink:

First of all, I’m using nginx 0.8.45 and have a wiki on my website
that’s configured to use images off of Wikimedia Commons. It saves the
images onto my server and updates them at regular intervals…
http://urcreative.hobby-site.com/wiki/images/thumb/3/34/25%.svg/9px-25%.svg.png

Was it working with prev. nginx version?

It seems that your redirect is actually configured to handle
http://urcreative.hobby-site.com/wiki/images/thumb/3/34/25%
25.svg/9px-25%25.svg.png

(every percent sign that you put in your URL I’ve replaced to %25)

Could you show fragment of your config and probably I or someone else
will be able to figure out what’s wrong?

Bad request is probably happening because nginx is trying to decode %xx
in your url but finds “%.s” which is not supposed to be in URL…

Alex.
p.s. cheers from dyndns.com team :slight_smile: