Web Connection
HTMLdatagrid -- page links with portnumber issue
Gravatar is a globally recognized avatar based on your email address. HTMLdatagrid -- page links with portnumber issue
  Greg Dohm
  All
  Jul 12, 2020 @ 02:28pm

Hi Rick,

I am running version 7.125 of webconnection and am having an issue with the port number being appended to the end of the pager control link.

The grid and autopager control work well using the new webconnection server. However, when I switch to IIS local server or IIS at example.com the links become: local80\default.htm example80.com

Just wondering how to prevent the port number from being appended.

Thanks,

Greg

Gravatar is a globally recognized avatar based on your email address. re: HTMLdatagrid -- page links with portnumber issue
  Rick Strahl
  Greg Dohm
  Jul 12, 2020 @ 10:04pm

It's a bug that's crept in in 7.12. I belive this was fixed in an update to the downloads.

The issue wwRequest::GetServerName():

*********************************************************************
FUNCTION GetServerName()
************************
#IF .F.
*:Help Documentation
*:Topic:
wwRequest::GetServerName

*:Description:
Returns the server IP or domain as specified in the URL
*:ENDHELP
#ENDIF
*********************************************************************
LOCAL lcServer, lcPort

lcServer = THIS.ServerVariables("SERVER_NAME")
IF EMPTY(lcServer)
    lcServer = THIS.ServerVariables("HTTP_HOST")
ENDIF
IF EMPTY(lcServer)
   RETURN ""
ENDIF   
    
*** check for port    
IF (AT(":",lcServer) > 0)
   RETURN lcServer  && already has port
ENDIF
   
   
lcPort = THIS.ServerVariables("SERVER_PORT")
IF lcPort == "80" OR lcPort == "443" OR EMPTY(lcPort)
   RETURN lcServer   && don't return port for standards
ENDIF   

*** add the port if it's missing
RETURN lcServer + ":" + lcPort
ENDFUNC
* EOF wwRequest::GetServerName
© 1996-2024