ObjFW  Check-in [7f93f420b5]

Overview
Comment:Specify the encoding for HTTP POST request data.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7f93f420b58b4c571ea9b7adb60d4b6c1a36287ab18fb413594519548ff23d5d
User & Date: js on 2011-09-15 11:01:04
Other Links: manifest | tags
Context
2011-09-15
11:18
Fix a missing rename. check-in: 100ba19a60 user: js tags: trunk
11:01
Specify the encoding for HTTP POST request data. check-in: 7f93f420b5 user: js tags: trunk
10:57
Add -[tryReadTillDelimiter:]. check-in: bd923d90c7 user: js tags: trunk
Changes

Modified src/OFHTTPRequest.m from [cc46fb2dcd] to [7c931c50fb].

254
255
256
257
258
259
260
261


262
263
264
265
266
267
268
254
255
256
257
258
259
260

261
262
263
264
265
266
267
268
269







-
+
+







		while ((key = [keyEnumerator nextObject]) != nil &&
		    (object = [objectEnumerator nextObject]) != nil)
			[sock writeFormat: @"%@: %@\r\n", key, object];

		if (requestType == OF_HTTP_REQUEST_TYPE_POST) {
			if ([headers objectForKey: @"Content-Type"] == nil)
				[sock writeString: @"Content-Type: "
				   @"application/x-www-form-urlencoded\r\n"];
				    @"application/x-www-form-urlencoded; "
				    @"charset=UTF-8\r\n"];

			if ([headers objectForKey: @"Content-Length"] == nil)
				[sock writeFormat: @"Content-Length: %d\r\n",
				    [queryString UTF8StringLength]];
		}

		[sock writeString: @"\r\n"];