Add new features #3
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mike/bash-web-server!3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "Cosmoledo/add-new-features"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hey, I really liked this project and your video was very informative.
So, I decided to experiment with this server and how it serves my website.
I have made some changes and I am very interested what you think about them:
acceptonbash 5.3.0(1)-releasewas already kinda fastMaybe that could be a project/video on it's own: How to parse, validate and modify a HTML string within Bash 😄
@ -50,0 +67,4 @@webp) echo 'image/webp';;woff) echo 'font/woff';;woff2) echo 'font/woff2';;xml) echo 'application/xml';;I am particularly curious about your thoughts here
hey, thank you for the PR - I appreciate you making it and adding new features.
I'm happy to merge some of these features but would prefer them as separate PRs:
As for the inlining elements - i don't want this server to do any modifications of the users data so i don't want this feature in the server. IMO I imagine this process of inlining elements of base64 and modifying the users file being something that happens outside of this code. I.e.: a pre-processor or build script the user runs before they serve the data.
I don't want this base64 stuff in this code, but I still wanted to give you a review - so here are my thoughts.
@ -50,0 +67,4 @@webp) echo 'image/webp';;woff) echo 'font/woff';;woff2) echo 'font/woff2';;xml) echo 'application/xml';;ha, we call this CHEATING :p
variable should be:
localuse the
fatalfunctionshould be made local
external utilities used
bcis externaluse fatal function or just return 1 here
quote
"${keys[@]}"use consistent indenting
because this is wrapped in
$( ... )the calls toexitin that function won't actually stop the running script. aka no errors will be caught here.Hey, thank you for your comments. I agree with them.
I was about to update my PR, but you added this file, which name is invalid on windows. So I cannot pull the main branch, I also see no purpose of said file.
oh how fun - yeah that was for testing weird characters, deleted in the main branch now.
Ok, I fixed your comments and put my inline-methods to separate files.
So, that they don't change the server, but they exist in case we want to implement them in the future.
I hope it's now more in line with your initial thoughts 😄
Should I still split everything into multiple PRs or is it ok now?
It should be fine as long as you don't squash.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.