From d1c1d275848bd9ed3c39a08e3af760955f7ee1d1 Mon Sep 17 00:00:00 2001 From: mnaumann Date: Tue, 21 Dec 2010 00:32:54 +0000 Subject: [PATCH] * change HTTP user agent to conform with new software title (no dash) * configure HTTP client to follow redirections ("Location:" header/3xx status) * glest.ini: update master server, announcement and version check URLs; reorder MasterServerExternalPortList; add introduction text --- mk/linux/glest.ini | 16 +++++++++++----- source/shared_lib/sources/util/util.cpp | 6 +++++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/mk/linux/glest.ini b/mk/linux/glest.ini index 690f8588..dde67376 100644 --- a/mk/linux/glest.ini +++ b/mk/linux/glest.ini @@ -1,10 +1,17 @@ ; === propertyMap File === +; This file defines default properties and values. Do not edit this file, +; instead, to modify, copy any properties to glestuser.ini, then change these as +; needed. Values contained in glestuser.ini will overwrite values found here. +; +; For explanation of these properties, please refer to the MegaGlest wiki at +; http://wiki.megaglest.org/ +; AiLog=0 AiRedir=false AllowDownloadDataSynch=false AllowGameDataSynchCheck=false AllowRotateUnits=true -AnnouncementURL=http://megaglest.pepper.freeit.org/announcement.txt +AnnouncementURL=http://master.megaglest.org/files/announcement.txt AutoMaxFullScreen=false AutoTest=false CheckGlCaps=true @@ -45,10 +52,8 @@ FontMenuVeryBigBaseSize=25 FontSizeAdjustment=0 Lang=english MaxLights=3 -;Masterserver=http://soft-haus.com/glest/cgi-bin/ -;MasterServerExternalPortList=80,143,587,21,110,25,443,993,995 -Masterserver=http://megaglest.pepper.freeit.org/masterserver/ -MasterServerExternalPortList=61357,61358,61359,61360,61000,80,143,587,21,110,25,443,993,995,1080,8080 +Masterserver=http://master.megaglest.org/ +MasterServerExternalPortList=61357,61358,61359,61360,61000,80,1080,8000,8080,443,21,22,25,110,143,587,993,995 NetPlayerName=newbie NetworkConsistencyChecks=true PhotoMode=false @@ -70,4 +75,5 @@ StencilBits=0 Textures3D=true UnitParticles=true UserData_Root=mydata/ +VersionURL=http://master.megaglest.org/files/versions/ Windowed=false diff --git a/source/shared_lib/sources/util/util.cpp b/source/shared_lib/sources/util/util.cpp index 74732d6e..8e50b9cc 100644 --- a/source/shared_lib/sources/util/util.cpp +++ b/source/shared_lib/sources/util/util.cpp @@ -106,7 +106,11 @@ std::string SystemFlags::getHTTP(std::string URL,CURL *handle,int timeOut) { /* some servers don't like requests that are made without a user-agent field, so we provide one */ - curl_easy_setopt(handle, CURLOPT_USERAGENT, "mega-glest-agent/1.0"); + curl_easy_setopt(handle, CURLOPT_USERAGENT, "megaglest-agent/1.0"); + + /* follow HTTP redirects (status 3xx), 20 at most */ + curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1); + curl_easy_setopt(handle, CURLOPT_MAXREDIRS, 20); SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d] handle = %p\n",__FILE__,__FUNCTION__,__LINE__,handle);