ObjFW  Check-in [02f4bdcb94]

Overview
Comment:Similar User-Agent/Server in OFHTTP{Client,Server}
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 02f4bdcb9427c48367c68d11dc58364c9d129317e4f95b66534c355975f8396b
User & Date: js on 2023-09-14 21:04:23
Other Links: manifest | tags
Context
2023-09-16
22:23
README.md: Document how to install packages check-in: ea8787d630 user: js tags: trunk
2023-09-14
21:04
Similar User-Agent/Server in OFHTTP{Client,Server} check-in: 02f4bdcb94 user: js tags: trunk
19:11
ChangeLog: Adjust release date for 1.0.3 check-in: 0a07dab4ee user: js tags: trunk
Changes

Modified src/OFHTTPClient.m from [e9090ece5a] to [f5ef5b6f99].

174
175
176
177
178
179
180
181
182


183
184
185
186
187
188
189
174
175
176
177
178
179
180


181
182
183
184
185
186
187
188
189







-
-
+
+







		authorization = [OFString stringWithFormat:
		    @"Basic %@", authorizationData.stringByBase64Encoding];

		[headers setObject: authorization forKey: @"Authorization"];
	}

	if ([headers objectForKey: @"User-Agent"] == nil)
		[headers setObject: @"Something using ObjFW "
				    @"<https://objfw.nil.im/>"
		[headers setObject: @"OFHTTPClient (ObjFW's HTTP client class "
				    @"<https://objfw.nil.im/>)"
			    forKey: @"User-Agent"];

	if (request.protocolVersion.major == 1 &&
	    request.protocolVersion.minor == 0 &&
	    [headers objectForKey: @"Connection"] == nil)
		[headers setObject: @"keep-alive" forKey: @"Connection"];