File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public extension BasicAuthModule {
3838 #if canImport(Foundation) // `String.Encoding.utf8`, provide alternative!
3939 /**
4040 * Extract HTTP Basic authentication credentials (name/pass) from the given
41- * ``` IncomingMessage` ``.
41+ * ``IncomingMessage``.
4242 *
4343 * - Parameters:
4444 * - request: The ``IncomingMessage`` containing the `Authorization`
@@ -81,7 +81,7 @@ public extension BasicAuthModule {
8181 throw BasicAuthError . differentAuthorization
8282 }
8383
84- let payload = String ( authString [ authString. index ( after: idx) ] )
84+ let payload = String ( authString [ authString. index ( after: idx) ... ] )
8585 . trimmingCharacters ( in: . whitespacesAndNewlines)
8686
8787 guard let data = Data ( base64Encoded: payload) else {
@@ -98,7 +98,7 @@ public extension BasicAuthModule {
9898
9999 return Credentials (
100100 name: String ( string [ string. startIndex..< colIdx] ) ,
101- pass: String ( string [ colIdx..< string. endIndex] )
101+ pass: String ( string [ string . index ( after : colIdx) ..< string. endIndex] )
102102 )
103103 }
104104 #endif // canImport(Foundation)
You can’t perform that action at this time.
0 commit comments