tim Rowledge uploaded a new version of WebClient-Core to project The Trunk: http://source.squeak.org/trunk/WebClient-Core-tpr.134.mcz
==================== Summary ====================
Name: WebClient-Core-tpr.134 Author: tpr Time: 23 October 2023, 4:37:33.991338 pm UUID: b9becdc8-3565-4125-b613-cdcef937eac9 Ancestors: WebClient-Core-ul.133
Use the simple (and cached) "Smalltalk platformName" instead of several roundabout methods
=============== Diff against WebClient-Core-ul.133 ===============
Item was changed: ----- Method: WebClient>>canVerify (in category 'testing') ----- canVerify
^ (stream respondsTo: #canVerify) ifTrue: [stream canVerify] + ifFalse: [Smalltalk platformName ~= 'Mac OS']! - ifFalse: [WebUtils platformName ~= 'Mac OS']!
Item was changed: ----- Method: WebClient>>defaultUserAgent (in category 'initialize') ----- defaultUserAgent "Answer the default User-Agent string to use for WebClient"
^'WebClient/1.5 (', WebUtils mcVersion, '; ', SystemVersion current version,'-', SystemVersion current highestUpdate printString, '; ', + Smalltalk platformName,')'. - WebUtils platformName,')'. !
Item was changed: ----- Method: WebServer class>>serverString (in category 'accessing') ----- serverString "Returns the server string to be used in responses"
^'WebServer/1.5 (', WebUtils mcVersion, '; ', SystemVersion current version,'-', SystemVersion current highestUpdate printString, '; ', + Smalltalk platformName,')'. - WebUtils platformName,')'. !
Item was changed: ----- Method: WebServer>>systemInfoOn: (in category 'errors') ----- systemInfoOn: strm "Provides system information for a server error report"
strm nextPutAll: 'VM: '; + nextPutAll: Smalltalk platformName; - nextPutAll: WebUtils platformName; nextPutAll: ' - '; + nextPutAll: Smalltalk vmVersion; - nextPutAll: WebUtils vmVersion; cr.
strm nextPutAll: 'Image: '; nextPutAll: SystemVersion current version asString; nextPutAll: ' ['; + nextPutAll: Smalltalk lastUpdateString asString; - nextPutAll: SmalltalkImage current lastUpdateString asString; nextPutAll: ']'; cr.
strm cr.
SecurityManager default printStateOn: strm.
"Additional info available from the windows VM" + Smalltalk platformName = 'Win32' ifTrue:[ - WebUtils platformName = 'Win32' ifTrue:[ 10001 to: 10003 do:[:i| | info | + info := (Smalltalk getSystemAttribute: i) ifNil:['']. - info := (SmalltalkImage current getSystemAttribute: i) ifNil:['']. info := info copyReplaceAll: String lf with: String cr. info isEmpty ifFalse:[strm cr; nextPutAll: info]]]. !
Item was changed: ----- Method: WebUtils class>>platformName (in category 'misc') ----- platformName "Return the name of the platform we're running on."
+ ^Smalltalk platformName! - ^Smalltalk getSystemAttribute: 1001!
Item was changed: ----- Method: WebUtils class>>vmVersion (in category 'misc') ----- vmVersion "Return a string identifying the interpreter version"
+ ^Smalltalk vmVersion! - ^Smalltalk getSystemAttribute: 1004!
packages@lists.squeakfoundation.org