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"];
|