Thread Tools Display Modes
11-05-11, 03:48 AM   #1
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
CDN getfile.php not working properly

I'm having an error with the download of the latest Roth UI.

http://www.wowinterface.com/download...hUIDiablo.html

The download link is:
http://www.wowinterface.com/download...5-RothUIDiablo

Which translates into:
Code:
http://cdn.wowinterface.com/downloads/getfile.php?id=9175&d=1320427624
The problem is this
Ampersands (&'s) in URLs

Another common error occurs when including a URL which contains an ampersand ("&"):

<!-- This is invalid! --> <a href="foo.cgi?chapter=1&section=2&copy=3&lang=en">...</a>

This example generates an error for "unknown entity section" because the "&" is assumed to begin an entity reference. Browsers often recover safely from this kind of error, but real problems do occur in some cases. In this example, many browsers correctly convert &copy=3 to ©=3, which may cause the link to fail. Since &lang; is the HTML entity for the left-pointing angle bracket, some browsers also convert &lang=en to 〈=en. And one old browser even finds the entity &sect;, converting &section=2 to §ion=2.

To avoid problems with both validators and browsers, always use &amp; in place of & when writing URLs in HTML:

<a href="foo.cgi?chapter=1&amp;section=2&amp;copy=3&amp;lang=en">...</a>

Note that replacing & with &amp; is only done when writing the URL in HTML, where "&" is a special character (along with "<" and ">"). When writing the same URL in a plain text email message or in the location bar of your browser, you would use "&" and not "&amp;". With HTML, the browser translates "&amp;" to "&" so the Web server would only see "&" and not "&amp;" in the query string of the request.
http://htmlhelp.com/tools/validator/problems.html

There is an amersand html string in the url which bugs out the server.

Browsers itself replaces & amp ; in HTML to & but not the server. It needs a clean URL without any HTML substitutions.

If I correct the URL by myself it is working
Code:
http://cdn.wowinterface.com/downloads/getfile.php?id=9175&d=1320427624
http://php.net/manual/en/function.ht...ity-decode.php
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 11-05-11 at 03:58 AM.
  Reply With Quote
11-05-11, 03:56 AM   #2
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
What browser? Firefox handles it when I try to download...

*Edit*

As for errors in html syntax, don't start... there are nearly 200 errors and 100 warnings in the html on the page for download, lol. :P
  Reply With Quote
11-05-11, 03:59 AM   #3
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Interesting. My Firefox (7.0.1) bugs out on the download.

*edit*
I had an idea and it worked. I cleared my Cache and now it is working. But what the heck would place anything in my Cache (other than a static html page) that would do this.

If I click the link again after I clicked it once the error appears again. Lol.
Maybe there is more than one server for downloads and some having a bad file? I can only guess.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 11-05-11 at 04:13 AM.
  Reply With Quote
11-05-11, 04:12 AM   #4
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
Very odd, but considering how each Firefox runs various addons others dont, maybe somehow an addon did something. :P

But, still you have a point; &amp; is only to be used in the "href" attribute of a <a> tag, it will be automatically translated into "&" by the browser when used, but shouldn't remain as "&amp;" or the browser has messed up.
Also a common problem is doing this sometimes "&amp;amp;" (double & escaping) may also cause problems, hehe. Not applicable to this situation tough.
  Reply With Quote
11-05-11, 11:41 AM   #5
Dolby
PPAP
 
Dolby's Avatar
WoWInterface Admin
Join Date: Feb 2004
Posts: 2,341
Thanks for the heads up. I've switched out the forwarding to our CDN to use a plain & for the date line. Let me know if that has fixed it for you.

I tested this with nearly every browser out there along with curl -O and wget and never had a problem. I wonder what you have that is causing this? What AddOns for FireFox are you running?


BTW moved this thread... if you post in this forum I get an email alert and see things quicker.
  Reply With Quote
11-29-11, 10:35 AM   #6
kneeki
A Flamescale Wyrmkin
 
kneeki's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 134
I had this same problem running Chrome. Clearing the cache as stated above fixed the issue.
  Reply With Quote

WoWInterface » Site Forums » Site help, bugs, suggestions/questions » CDN getfile.php not working properly


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off