httpswift / swifter

Tiny http server engine written in Swift programming language.
BSD 3-Clause "New" or "Revised" License
3.9k stars 539 forks source link

Fix ** not matching single path segment #504

Closed michaelenger closed 10 months ago

michaelenger commented 3 years ago

Fixes #488.

When we reache the ** node we're at the path segment it is going to match against. The currentIndex is incremented on line 125 which means that we're going to continue checking from the next segment over. So if we increment again before we go into the while loop we've skipped over one and will fail to match the end of the path against our pattern.

swifter-bot commented 3 years ago
2 Warnings
:warning: It seems like you've added new tests to the library. If that's the case, please update the XCTestManifests.swift file running in your terminal the command swift test --generate-linuxmain.
:warning: If you ran the command swift test --generate-linuxmain in your terminal, please remove the line testCase(IOSafetyTests.__allTests__IOSafetyTests), from public func __allTests() -> [XCTestCaseEntry] in the bottom of the file. For more reference see #366.
1 Message
:book: Hey, @michaelenger 👋.

Generated by :no_entry_sign: Danger

michaelenger commented 10 months ago

Closing this as it's clear it won't be merged.