ObjFW  Check-in [51cfed24d2]

Overview
Comment:utils/ofhttp: Allow specifying - to -b for stdin
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 51cfed24d25cae9019faa7afd8ddf7c32bf300546f9d5e5c655c1f2ca7ac28a7
User & Date: js on 2015-06-14 12:47:05
Other Links: manifest | tags
Context
2015-06-14
13:10
OFDate: Improve handling of distant past / future check-in: 168b748eb8 user: js tags: trunk
12:47
utils/ofhttp: Allow specifying - to -b for stdin check-in: 51cfed24d2 user: js tags: trunk
12:43
Minor interface fixes check-in: f62c04e5d8 user: js tags: trunk
Changes

Modified utils/ofhttp/OFHTTP.m from [3efdc075b3] to [4ec503b029].

135
136
137
138
139
140
141
142

143
144








145

146
147
148
149
150
151
152
135
136
137
138
139
140
141

142
143
144
145
146
147
148
149
150
151
152

153
154
155
156
157
158
159
160







-
+


+
+
+
+
+
+
+
+
-
+







	    of_range(pos + 1, [header length] - pos - 1)];
	value = [value stringByDeletingEnclosingWhitespaces];

	[_clientHeaders setObject: value
			   forKey: name];
}

- (void)setBody: (OFString*)body
- (void)setBody: (OFString*)file
{
	[_body release];

	if ([file isEqual: @"-"]) {
		void *pool = objc_autoreleasePoolPush();

		_body = [[of_stdin readDataArrayTillEndOfStream] retain];

		objc_autoreleasePoolPop(pool);
	} else
	_body = [[OFDataArray alloc] initWithContentsOfFile: body];
		_body = [[OFDataArray alloc] initWithContentsOfFile: file];
}

- (void)setMethod: (OFString*)method
{
	void *pool = objc_autoreleasePoolPush();

	method = [method uppercaseString];