Differences From Artifact [a75e2ea261]:
- File src/OFHTTPServer.m — part of check-in [a06354b42a] at 2017-10-22 15:05:39 on branch trunk — Make Apple GCC with -Wshadow happy (user: js, size: 16862) [annotate] [blame] [check-ins using]
To Artifact [380d4e5179]:
- File
src/OFHTTPServer.m
— part of check-in
[0f995db06d]
at
2017-10-28 21:08:37
on branch trunk
— Make OFURL more generic
This removes the special handling dependent on the scheme. (user: js, size: 16931) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
19 20 21 22 23 24 25 | #include <stdlib.h> #include <string.h> #import "OFHTTPServer.h" #import "OFData.h" #import "OFDate.h" #import "OFDictionary.h" | | | | > | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #include <stdlib.h> #include <string.h> #import "OFHTTPServer.h" #import "OFData.h" #import "OFDate.h" #import "OFDictionary.h" #import "OFHTTPRequest.h" #import "OFHTTPResponse.h" #import "OFNumber.h" #import "OFTCPSocket.h" #import "OFTimer.h" #import "OFURL.h" #import "OFAlreadyConnectedException.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFNotOpenException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" |
| ︙ | ︙ | |||
650 651 652 653 654 655 656 | _host = [[_server host] retain]; _port = [_server port]; } URL = [OFMutableURL URL]; [URL setScheme: @"http"]; [URL setHost: _host]; | > | | 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 |
_host = [[_server host] retain];
_port = [_server port];
}
URL = [OFMutableURL URL];
[URL setScheme: @"http"];
[URL setHost: _host];
if (_port != 80)
[URL setPort: [OFNumber numberWithUInt16: _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)];
|
| ︙ | ︙ |