realXtend / tundra

realXtend Tundra SDK, a 3D virtual world application platform.
www.realxtend.org
Apache License 2.0
84 stars 70 forks source link

Make HttpAssetProvider hande '302 Found' response #685

Closed jonnenauha closed 11 years ago

jonnenauha commented 11 years ago

Make it handle http://en.wikipedia.org/wiki/HTTP_302 correctly.

We already do this for 307 Temporary Redirect that is used by Amazon in various situations. Seems that recently dropbox moved their URL schema from http://dl.dropbox.com/u/<ID>/<PATH> to http://dl.dropboxusercontent.com/u/<ID>/<PATH> the old URLs return a 302 Found with the new URL.

Anyone who wants to tackle this its probably a 1 minute job, just look at the 307 handler that I've made earlier https://github.com/realXtend/naali/blob/tundra2/src/Core/AssetModule/HttpAssetProvider.cpp?source=c#L443

jonnenauha commented 11 years ago

Actually looking at it the same code will work for both response codes. So this should be a single liner else if (statusCode == 307 || statusCode == 302) at https://github.com/realXtend/naali/blob/tundra2/src/Core/AssetModule/HttpAssetProvider.cpp?source=c#L444