conwnet / github1s

One second to read GitHub code with VS Code.
https://github1s.com
MIT License
22.89k stars 871 forks source link

Unable to open the file that the filename contains '%' #439

Closed stevenlee7189 closed 2 years ago

stevenlee7189 commented 2 years ago

github1s returns 400 bad request if the filename contains '%'

For example: https://github1s.com/AspeedTech-BMC/openbmc/blob/aspeed-master/meta-aspeed-sdk/meta-ast2600-sdk/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04%.bbappend

welcome[bot] commented 2 years ago

Hello there!πŸ‘‹ Welcome to the project!πŸ’– Thank you and congratsπŸŽ‰for opening your very first issue in this project.Be patient while we get back to you.πŸ˜„

github-actions[bot] commented 2 years ago

Hello there stevenlee7189 πŸ‘‹

Welcome to github1s !!πŸ’–πŸ₯³

Thank you and congratulations πŸŽ‰ for opening your very first issue in this project. github1s fosters an open and welcoming environment for all our contributors.🌸

Incase you want to claim this issue, please comment down below! We will try to get back to you as soon as we can.πŸ‘€

Feel free to visit github1s.com. πŸ‘©β€πŸ’» If you have any interesting ideas, just open an issue. We would love to hear you and engage in discussions.

Siddhant-K-code commented 2 years ago

The URL you provided doesn't seem to work on GitHub either. I tried it removing the 1s. I got the following page:

image

But, if you try to open the same from GitHub UI (through repository), you will notice that GitHub automatically adds a number called 25 after %. This is the URL that I got from GitHub: https://github.com/AspeedTech-BMC/openbmc/blob/2214c648537a275b174f01be678052456879b138/meta-aspeed-sdk/meta-ast2600-sdk/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04%25.bbappend while opening the file openbmc/meta-aspeed-sdk/meta-ast2600-sdk/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04%.bbappend

I think, our middleware are unable to redirect to the same & searching for the exact file, that's why it is returning 404.

WDYT, any possible way to fix this? @conwnet

conwnet commented 2 years ago

I think, our middleware are unable to redirect to the same & searching for the exact file, that's why it is returning 404.

Yes I think so, but I'm not quite sure yet. Let me try fix it.