[squeak-dev] The Trunk: WebClient-Core-mt.130.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Apr 20 07:47:41 UTC 2022
Marcel Taeumel uploaded a new version of WebClient-Core to project The Trunk:
http://source.squeak.org/trunk/WebClient-Core-mt.130.mcz
==================== Summary ====================
Name: WebClient-Core-mt.130
Author: mt
Time: 20 April 2022, 9:47:40.059048 am
UUID: 5c0a8586-880f-9e4c-ab9c-3bcacade9287
Ancestors: WebClient-Core-ct.129
Adds support for cookie field "SameSite".
Adds a line break when reporting unknown fields on the Transcript.
=============== Diff against WebClient-Core-ct.129 ===============
Item was changed:
Object subclass: #WebCookie
+ instanceVariableNames: 'name value path domain expiry version secure httpOnly comment sameSite'
- instanceVariableNames: 'name value path domain expiry version secure httpOnly comment'
classVariableNames: ''
poolDictionaries: ''
category: 'WebClient-Core'!
!WebCookie commentStamp: 'ar 2/22/2010 05:28' prior: 0!
WebCookie represents an http cookie for use by WebClient.!
Item was changed:
----- Method: WebCookie>>readFrom: (in category 'initialize') -----
readFrom: aStream
"Read a cookie from the given stream"
| keyval key val |
aStream skipSeparators.
name := (aStream upTo: $=) withBlanksTrimmed.
value := (aStream upTo: $;) withBlanksTrimmed.
[aStream atEnd] whileFalse:[
keyval := aStream upTo: $;.
key := (keyval copyUpTo: $=) withBlanksTrimmed.
val := (keyval copyAfter: $=) withBlanksTrimmed.
key asLowercase caseOf: {
['expires'] -> [self expiry: (self readExpiryFrom: val)].
['path'] -> [self path: (WebUtils unquote: val)].
['domain'] -> [self domain: (WebUtils unquote: val)].
['secure'] -> [self secure: true].
['version'] -> [self version: val].
['httponly'] -> [self httpOnly: true].
['comment'] ->[self comment: val].
['max-age'] ->[self expirySeconds: val asNumber].
+ ['samesite'] -> [self sameSite: val].
+ } otherwise:[Transcript showln: 'Unknown cookie field: ', key, ' = ', val].
- } otherwise:[Transcript show: 'Unknown cookie field: ', key].
].!
Item was added:
+ ----- Method: WebCookie>>sameSite (in category 'accessing') -----
+ sameSite
+ "https://datatracker.ietf.org/doc/html/draft-west-cookie-samesite-firstparty-01"
+
+ ^ sameSite!
Item was added:
+ ----- Method: WebCookie>>sameSite: (in category 'accessing') -----
+ sameSite: value
+
+ sameSite := value.!
More information about the Squeak-dev
mailing list
|