The Trunk: WebClient-Core-mt.124.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: WebClient-Core-mt.124.mcz

commits-2
Marcel Taeumel uploaded a new version of WebClient-Core to project The Trunk:
http://source.squeak.org/trunk/WebClient-Core-mt.124.mcz

==================== Summary ====================

Name: WebClient-Core-mt.124
Author: mt
Time: 1 October 2020, 3:33:31.12048 pm
UUID: ded69be5-bdb0-ea47-9289-4c4d01285b08
Ancestors: WebClient-Core-ul.123

Merges WebClient-Core-monty.113 (-> treated), which fixes the missing #closeIfTransient for #getContentWithProgress:. However, do it differently than proposed, that is, use the template method that is re-used in subclasses.

=============== Diff against WebClient-Core-ul.123 ===============

Item was removed:
- ----- Method: WebResponse>>content (in category 'accessing') -----
- content
- "Reimplemented to close the socket if the request is transient"
-
- content ifNil:[
- content := self getContent.
- self closeIfTransient.
- ].
- ^content!

Item was removed:
- ----- Method: WebResponse>>getContent (in category 'private') -----
- getContent
- "   Any response to a HEAD request and any response with a 1xx
-        (Informational), 204 (No Content), or 304 (Not Modified) status
-        code is always terminated by the first empty line after the
-        header fields, regardless of the header fields present in the
-        message, and thus cannot contain a message body.
- - https://tools.ietf.org/html/rfc7230#section-3.3.3 "
-
- (request method = 'HEAD' or: [(code between: 100 and: 199) or: [code = 204 or: [code = 304]]]) ifTrue:[^''].
- ^super getContent!

Item was added:
+ ----- Method: WebResponse>>getContentWithProgress: (in category 'private') -----
+ getContentWithProgress: progressBlockOrNil
+ "Any response to a HEAD request and any response with a 1xx (Informational), 204 (No Content), or 304 (Not Modified) status code is always terminated by the first empty line after the header fields, regardless of the header fields present in the message, and thus cannot contain a message body. See https://tools.ietf.org/html/rfc7230#section-3.3.3 "
+
+ [
+ (request method = 'HEAD'
+ or: [(code between: 100 and: 199)
+ or: [code = 204
+ or: [code = 304]]]) ifTrue: [^ ''].
+
+ ^ super getContentWithProgress: progressBlockOrNil
+
+ ] ensure: [self closeIfTransient]!