mirror of
https://github.com/swisspol/GCDWebServer.git
synced 2026-02-11 00:00:07 +08:00
@@ -300,6 +300,9 @@ NS_ASSUME_NONNULL_END
|
||||
GWS_DCHECK(requestURL);
|
||||
}
|
||||
NSString* urlPath = requestURL ? CFBridgingRelease(CFURLCopyPath((CFURLRef)requestURL)) : nil; // Don't use -[NSURL path] which strips the ending slash
|
||||
if (urlPath == nil) {
|
||||
urlPath = @"/"; // CFURLCopyPath() returns NULL for a relative URL with path "//" contrary to -[NSURL path] which returns "/"
|
||||
}
|
||||
NSString* requestPath = urlPath ? GCDWebServerUnescapeURLString(urlPath) : nil;
|
||||
NSString* queryString = requestURL ? CFBridgingRelease(CFURLCopyQueryString((CFURLRef)requestURL, NULL)) : nil; // Don't use -[NSURL query] to make sure query is not unescaped;
|
||||
NSDictionary* requestQuery = queryString ? GCDWebServerParseURLEncodedForm(queryString) : @{};
|
||||
|
||||
Reference in New Issue
Block a user