ObjFW  Diff

Differences From Artifact [a75e2ea261]:

To Artifact [380d4e5179]:


19
20
21
22
23
24
25
26
27
28
29
30

31
32
33
34
35
36
37
#include <stdlib.h>
#include <string.h>

#import "OFHTTPServer.h"
#import "OFData.h"
#import "OFDate.h"
#import "OFDictionary.h"
#import "OFURL.h"
#import "OFHTTPRequest.h"
#import "OFHTTPResponse.h"
#import "OFTCPSocket.h"
#import "OFTimer.h"


#import "OFAlreadyConnectedException.h"
#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFNotOpenException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.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

657
658
659
660
661
662
663
664
		_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)];







>
|







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)];