69339a3239e9643fbde81b7dd43bc2978a02e13e
hiram
  Wed May 25 10:38:27 2011 -0700
changing uses of cgiServerName to better cgiServerNamePort
diff --git src/hg/hgSession/hgSession.c src/hg/hgSession/hgSession.c
index 892210f..f7fa097 100644
--- src/hg/hgSession/hgSession.c
+++ src/hg/hgSession/hgSession.c
@@ -116,31 +116,31 @@
 	*(ptr+1) = '\0';
     safef(buf, sizeof(buf), "%s%s", path, "hgTracks");
     thePath = cloneString(buf);
     }
 return thePath;
 }
 
 void addSessionLink(struct dyString *dy, char *userName, char *sessionName,
 		    boolean encode)
 /* Add to dy an URL that tells hgSession to load a saved session.
  * If encode, cgiEncodeFull the URL. */
 {
 struct dyString *dyTmp = dyStringNew(1024);
 dyStringPrintf(dyTmp, "http://%s%s?hgS_doOtherUser=submit&"
 	       "hgS_otherUserName=%s&hgS_otherUserSessionName=%s",
-	       cgiServerName(), destAppScriptName(), userName, sessionName);
+	       cgiServerNamePort(), destAppScriptName(), userName, sessionName);
 if (encode)
     {
     dyStringPrintf(dy, "%s", cgiEncodeFull(dyTmp->string));
     }
 else
     {
     dyStringPrintf(dy, "%s", dyTmp->string);
     }
 dyStringFree(&dyTmp);
 }
 
 char *getSessionLink(char *encUserName, char *encSessionName)
 /* Form a link that will take the user to a bookmarkable page that
  * will load the given session. */
 {
@@ -160,31 +160,31 @@
 	       "body=Here is a UCSC browser session I%%27d like to share with "
 	       "you:%%20",
 	       cgiDecodeClone(encSessionName));
 addSessionLink(dy, encUserName, encSessionName, TRUE);
 dyStringPrintf(dy, "\">Email</A>\n");
 return dyStringCannibalize(&dy);
 }
 
 void addUrlLink(struct dyString *dy, char *url, boolean encode)
 /* Add to dy an URL that tells hgSession to load settings from the given url.
  * If encode, cgiEncodeFull the whole thing. */
 {
 struct dyString *dyTmp = dyStringNew(1024);
 char *encodedUrl = cgiEncodeFull(url);
 dyStringPrintf(dyTmp, "http://%s%s?hgS_doLoadUrl=submit&hgS_loadUrlName=%s",
-	       cgiServerName(), destAppScriptName(), encodedUrl);
+	       cgiServerNamePort(), destAppScriptName(), encodedUrl);
 if (encode)
     {
     dyStringPrintf(dy, "%s", cgiEncodeFull(dyTmp->string));
     }
 else
     {
     dyStringPrintf(dy, "%s", dyTmp->string);
     }
 freeMem(encodedUrl);
 dyStringFree(&dyTmp);
 }
 
 char *getUrlLink(char *url)
 /* Form a link that will take the user to a bookmarkable page that
  * will load the given url. */
@@ -462,31 +462,31 @@
     {
     printf("<LI>Each previously saved named session appears with "
 	   "Browser and Email links.  "
 	   "The Browser link takes you to the Genome Browser "
 	   "with that session loaded.  The resulting Genome Browser page "
 	   "can be bookmarked in your web browser and/or shared with others.  "
 	   "The Email link invokes your email tool with a message "
 	   "containing the Genome Browser link.</LI>\n");
     }
 else if (wikiLinkEnabled())
     {
     printf("<LI>If you <A HREF=\"%s\">sign in</A>, you will be able to save "
 	   "named sessions which will be displayed with Browser and Email "
 	   "links.</LI>\n", wikiLinkUserLoginUrl(cartSessionId(cart)));
     }
-dyStringPrintf(dyUrl, "http://%s%s", cgiServerName(), cgiScriptName());
+dyStringPrintf(dyUrl, "http://%s%s", cgiServerNamePort(), cgiScriptName());
 
 printf("<LI>If you have saved your settings to a local file, you can send "
        "email to others with the file as an attachment and direct them to "
        "<A HREF=\"%s\">%s</A> .</LI>\n",
        dyUrl->string, dyUrl->string);
 dyStringPrintf(dyUrl, "?hgS_doLoadUrl=submit&hgS_loadUrlName=");
 printf("<LI>If a saved settings file is available from a web server, "
        "you can send email to others with a link such as "
        "%s<B>U</B> where <B>U</B> is the URL of your "
        "settings file, e.g. http://www.mysite.edu/~me/mySession.txt .  "
        "In this type of link, you can replace "
        "\"hgSession\" with \"hgTracks\" in order to proceed directly to "
        "the Genome Browser.</LI>\n",
        dyUrl->string);
 printf("</UL>\n");
@@ -922,31 +922,31 @@
 			   "compressed text in one of the formats offered in "
 			   "<B>Save Settings</B>.", fileName);
 	}
     else
 	{
 	dyStringAppend(dyMessage, "Sorry, your web browser seems to have "
 		       "posted no data");
 	if (isNotEmpty(fileName))
 	    dyStringPrintf(dyMessage, ", only the filename <B>%s</B>",
 			   fileName);
 	dyStringAppend(dyMessage, ".  Your settings have not been changed.");
 	lf = NULL;
 	}
     dyStringPrintf(dyMessage, "&nbsp;&nbsp;"
 		   "<A HREF=\"http://%s%s?%s=%u\">Browser</A>",
-		   cgiServerName(), destAppScriptName(),
+	   cgiServerNamePort(), destAppScriptName(),
 		   cartSessionVarName(), cartSessionId(cart));
     }
 if (lf != NULL)
     {
     cartLoadSettings(lf, cart, NULL, actionVar);
     checkForCustomTracks(dyMessage);
     lineFileClose(&lf);
     }
 return dyStringCannibalize(&dyMessage);
 }
 
 char *doSessionDetail(char *sessionName)
 /* Show details about a particular session. */
 {
 struct dyString *dyMessage = dyStringNew(4096);