aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinteck <nekostarfan@gmail.com>2021-11-07 17:37:20 +0000
committerMinteck <nekostarfan@gmail.com>2021-11-07 17:37:20 +0000
commitd13afb20bac0b682f7e42c9655bc2af65aa9784a (patch)
tree627f4119072c5624672e13dda3762c7b320be0ff
parentddbfb714fbeac9a7209c995b56e6ee0e514d22d2 (diff)
downloadbashweb-d13afb20bac0b682f7e42c9655bc2af65aa9784a.tar.gz
bashweb-d13afb20bac0b682f7e42c9655bc2af65aa9784a.tar.bz2
bashweb-d13afb20bac0b682f7e42c9655bc2af65aa9784a.zip
Fixing time!
-rw-r--r--log1
-rwxr-xr-xpreprocessor/main.sh35
2 files changed, 16 insertions, 20 deletions
diff --git a/log b/log
index 5398f92..e69de29 100644
--- a/log
+++ b/log
@@ -1 +0,0 @@
-./bashweb.sh: line 30: ./proprocessor/main.sh: No such file or directory
diff --git a/preprocessor/main.sh b/preprocessor/main.sh
index 0fdfbc5..5aff989 100755
--- a/preprocessor/main.sh
+++ b/preprocessor/main.sh
@@ -1,20 +1,17 @@
#!/bin/bash
-while read stdin
-do
- data=$(cat index.bhtml | envsubst)
- echo "HTTP/1.1 200 OK"
- echo "Server: Bashweb"
- echo "Date: $(date)"
- echo "Content-Type: text/html; charset=utf-8"
- echo "Content-Length: ${#data}"
- echo "Connection: keep-alive"
- echo "X-Frame-Options: SAMEORIGIN"
- echo "X-XSS-Protection: 1; mode=block"
- echo "Cache-Control: private, no-cache, no-store, must-revalidate"
- echo "X-Content-Type-Options: nosniff"
- echo "Pragma: no-cache"
- echo "Expires: Sat, 01 Jan 2000 00:00:00 GMT"
- echo "Referrer-Policy: no-referrer-when-downgrade"
- echo ""
- echo $data
-done
+data=$(cat index.bhtml | envsubst)
+echo "HTTP/1.1 200 OK"
+echo "Server: Bashweb"
+echo "Date: $(date)"
+echo "Content-Type: text/html; charset=utf-8"
+echo "Content-Length: ${#data}"
+echo "Connection: keep-alive"
+echo "X-Frame-Options: SAMEORIGIN"
+echo "X-XSS-Protection: 1; mode=block"
+echo "Cache-Control: private, no-cache, no-store, must-revalidate"
+echo "X-Content-Type-Options: nosniff"
+echo "Pragma: no-cache"
+echo "Expires: Sat, 01 Jan 2000 00:00:00 GMT"
+echo "Referrer-Policy: no-referrer-when-downgrade"
+echo ""
+echo $data