michael-o commented on pull request #74: URL: https://github.com/apache/maven-wagon/pull/74#issuecomment-733056024
So I have checked RFC 3986, it does not say anything about path ending normalization. Therefore I have checked WHATWG's URL spec: https://url.spec.whatwg.org/#url-serializing. Especially 4.2, append `/` and segment. We need to split the path because it could come from an FS unencoded. Now what about parsing? If I understand [this](https://url.spec.whatwg.org/#path-state) correctly, the parser remains in path state until a termination or a state change happens. I think 4.2 applies here in the parsing, after the last slash the buffer is empty, but still appended. So `/test/demo.zip/` splits up into: 0: `"test"` 1: `"demo.zip"` 3: `""` So does the serialization happens. I need to check a few things and ask another expert. @ok2c What is your opinion on? So you PR is partially correct and the trailing slash should logically be retained, but not unconditionally appended. I will get back to you when my checks are complete. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
