Overview
Comment: | OFHTTPServer: Correctly put the query in the URL.
Before, it incorrectly was part of the path instead of being in the |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
f8a7660ac7cdc782ee0c91441785a473 |
User & Date: | js on 2012-12-26 19:07:59 |
Other Links: | manifest | tags |
Context
2012-12-26
| ||
19:55 | Add -[OFString stringByStandardizing(URL)Path]. check-in: b98fd10000 user: js tags: trunk | |
19:07 | OFHTTPServer: Correctly put the query in the URL. check-in: f8a7660ac7 user: js tags: trunk | |
15:25 | selector.m: Correctly check for slot exhaustion. check-in: 9741a3d43b user: js tags: trunk | |
Changes
Modified src/OFHTTPServer.m from [3793430199] to [a3b1ef98c3].
︙ | ︙ | |||
456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 | OFURL *URL; OFHTTPRequest *request; OFHTTPRequestResult *reply; OFDictionary *replyHeaders; OFDataArray *replyData; OFEnumerator *keyEnumerator, *valueEnumerator; OFString *key, *value; [timer invalidate]; [timer release]; timer = nil; if (host == nil || port == 0) { if (HTTPMinorVersion > 0) { [self sendErrorAndClose: 400]; return; } host = [[server host] retain]; port = [server port]; } URL = [OFURL URL]; [URL setScheme: @"http"]; [URL setHost: host]; [URL setPort: port]; | > > > > > > > > > > > > | | 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 | OFURL *URL; OFHTTPRequest *request; OFHTTPRequestResult *reply; OFDictionary *replyHeaders; OFDataArray *replyData; OFEnumerator *keyEnumerator, *valueEnumerator; OFString *key, *value; size_t pos; [timer invalidate]; [timer release]; timer = nil; if (host == nil || port == 0) { if (HTTPMinorVersion > 0) { [self sendErrorAndClose: 400]; return; } host = [[server host] retain]; port = [server port]; } URL = [OFURL 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]; request = [OFHTTPRequest requestWithURL: URL]; [request setRequestType: requestType]; [request setHeaders: headers]; [request setPOSTData: POSTData]; [request setRemoteAddress: [sock remoteAddress]]; |
︙ | ︙ |