Differences From Artifact [d18b7e3988]:
- File
src/OFHTTPServer.m
— part of check-in
[2b6fb5530e]
at
2017-06-21 20:20:27
on branch trunk
— OFHTTPServer: Include the / in the URL path
This was overlooked when URLs were changed to include the / in the path. (user: js, size: 16502) [annotate] [blame] [check-ins using]
To Artifact [db503301c5]:
- File src/OFHTTPServer.m — part of check-in [3a5570ab20] at 2017-07-20 22:28:01 on branch trunk — Split OFURL into OFURL and OFMutableURL (user: js, size: 16539) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
616 617 618 619 620 621 622 | date, [_server name]]; return false; } - (void)createResponse { | | | > > | 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 | date, [_server name]]; return false; } - (void)createResponse { OFMutableURL *URL; OFHTTPRequest *request; OFHTTPServerResponse *response; size_t pos; [_timer invalidate]; [_timer release]; _timer = nil; if (_host == nil || _port == 0) { if (_HTTPMinorVersion > 0) { [self sendErrorAndClose: 400]; return; } [_host release]; _host = [[_server host] retain]; _port = [_server port]; } URL = [OFMutableURL URL]; [URL setScheme: @"http"]; [URL setHost: _host]; [URL setPort: _port]; if ((pos = [_path rangeOfString: @"?"].location) != OF_NOT_FOUND) { OFString *path, *query; path = [_path substringWithRange: of_range(0, pos)]; query = [_path substringWithRange: of_range(pos + 1, [_path length] - pos - 1)]; [URL setPath: path]; [URL setQuery: query]; } else [URL setPath: _path]; [URL makeImmutable]; request = [OFHTTPRequest requestWithURL: URL]; [request setMethod: _method]; [request setProtocolVersion: (of_http_request_protocol_version_t){ 1, _HTTPMinorVersion }]; [request setHeaders: _headers]; [request setBody: _body]; |
︙ | ︙ |