Armory Links 404

Found a bug with the site? Let me know!
Post Reply
Narlash
Census Taker
Posts: 36
Joined: Tue Jun 20, 2006 11:16 am
Location: Sweden
Contact:

Armory Links 404

Post by Narlash »

Hey guys :) Just a super minor annoyance, which shouldn't be too hard to fix.
Would it be possible for someone to change the Armory Link from a + (plus) to a - (hyphen)?

Take for instance my main character's profile Armory Link.
I play on a server with a space in its name, Emerald Dream:

The link Warcraft Realms produces to the armory is

Code: Select all

http://us.battle.net/wow/en/character/Emerald+Dream/Milix/simple
This produces a 404 on the Armory.

A working link should be:

Code: Select all

http://us.battle.net/wow/en/character/Emerald-Dream/Milix/simple
Just switch the plus out for a hyphen and we should be good :)
Not a major issue, but it makes the site act a lot less broken.
Thanks! <3

User avatar
FuxieDK
Census Taker
Posts: 659
Joined: Thu May 22, 2008 11:36 am
Location: Copenhagen, DK

Post by FuxieDK »

.....if the link are being changed, PLEASE change "simple" to "advanced"..

I doubt anyone actually use simply viewing..
Doing census mainly on Draenor; Raluf - Nimsay - Lusmo - Quixx - Sosyan - Garthog - Trubin - Zalistra - Zesmi and Djaang

User avatar
bringoutyourdead
Forums Admin & general flunky
Posts: 1432
Joined: Fri Nov 07, 2008 1:11 pm
Location: Texas, USA

Post by bringoutyourdead »

I am going to have to play with the code...
so be warned.. the link to the Blizzards character display (the armory) will be acting strangely for the next few hours.

It is important to remember that almost everything you see here is custom built on the fly coding.
About the only page that is pure static html is the censusplus.php page that points to the addon distributions.

Oddly enough the code that points to the armory is different for US and EU regions (why? I haven't a clue.)
US realms use php urlencode to handle special characters in server names.. and has /simple added on the end. This is displayed as 'Armory Profile'
EU realms don't have the encoding and have /advanced added on the end. This is displayed as 'Armory Link'

There appears to be a incompatibility issue with the way PHP handles the encoding and the way Apache webserver handles the encoding.

User avatar
bringoutyourdead
Forums Admin & general flunky
Posts: 1432
Joined: Fri Nov 07, 2008 1:11 pm
Location: Texas, USA

Post by bringoutyourdead »

Sigh the appears to be damned if you do, and damned if you don't

SO I will be damned... I have removed the encoding to handle non-allowed items in a URL (specifically the space character).

We have 4 actors with their hands in the pie.

First we have the specification RFC 3986 which updates 1738 and obsoletes 3 other RFC specifications.

Second we have http servers such as Apache and others that take the html etc and respond to ...

Third the web browsers.. IE, Firefox, Chrome, Opera , etc.

And fourth we have PHP coding rules.


When you click on the link...
the Apache server here at Warcraftrealms.com sends the URL back to your browser with the coding that says the browser needs to act on that URL.
Your browser will do something with the link... but the vendors handle the URL differently.

For example
http://us.battle.net/wow/en/character/Area 52/Censushordta/advanced

the wr page produced has
href="http://us.battle.net/wow/en/character/Area 52/Deadwolfen/advanced" target="_blank">Armory Profile
clicking on that link in Firefox puts the same on the address bar.. but actually sends to us.battle.net the following
http://us.battle.net/wow/en/character/A ... a/advanced

whereas IE handles it as follows
address bar: http://us.battle.net/wow/en/character/A ... a/advanced
url requested: http://us.battle.net/wow/en/character/A ... a/advanced

So firefox displays what it was given but requests per standard
IE modifies to standard the display and the request.


At some point in time I think Rollie ran into a browser that wasn't working with the space -> % 20 standard... instead it was using the space -> + variant.. which is what PHP also used as standard under the older standards.

Narlash
Census Taker
Posts: 36
Joined: Tue Jun 20, 2006 11:16 am
Location: Sweden
Contact:

Post by Narlash »

Ho-ly crap! o.o
Well - It works now, so yay! Super much awesome internet points for you bringoutyourdead!!!!! You took one of the possibly most vainest of annoyances anyone could have and fixed it even though it was the most messiest of tasks. You sir, have won my ultimate respect and deepest gratitude.
Thank you!

Post Reply