Differences From Artifact [69c85c4501]:
- File
src/OFHTTPServer.m
— part of check-in
[9c506fc995]
at
2020-03-22 15:51:59
on branch trunk
— ofhttp: Print the HTTP status code on error
Without this, there would be no indication of the error when using -q. (user: js, size: 18813) [annotate] [blame] [check-ins using]
To Artifact [a8548d7f01]:
- File src/OFHTTPServer.m — part of check-in [a013a9d577] at 2020-03-22 16:15:08 on branch trunk — ofhttp: Allow all request methods (user: js, size: 18804) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
368 369 370 371 372 373 374 |
pos = [line rangeOfString: @" "].location;
if (pos == OF_NOT_FOUND)
return [self sendErrorAndClose: 400];
method = [line substringWithRange: of_range(0, pos)];
@try {
| | | | 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
pos = [line rangeOfString: @" "].location;
if (pos == OF_NOT_FOUND)
return [self sendErrorAndClose: 400];
method = [line substringWithRange: of_range(0, pos)];
@try {
_method = of_http_request_method_from_string(method);
} @catch (OFInvalidArgumentException *e) {
return [self sendErrorAndClose: 405];
}
@try {
of_range_t range = of_range(pos + 1, line.length - pos - 10);
path = [[[line substringWithRange:
|
| ︙ | ︙ |