summaryrefslogtreecommitdiff
path: root/main_server.go
diff options
context:
space:
mode:
authora <a@a.com>2025-08-11 05:09:55 +0000
committera <a@a.com>2025-08-11 05:09:55 +0000
commit3a78df7d613c61bf74a43ec023af23b47c9b5635 (patch)
treeef323247d381405804db61507449ad9592d5518b /main_server.go
parent445d90bd38e600617933124a1579579f6b905303 (diff)
fixes http in urlHEADmaster
Diffstat (limited to 'main_server.go')
-rw-r--r--main_server.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/main_server.go b/main_server.go
index 00d3938..a17d788 100644
--- a/main_server.go
+++ b/main_server.go
@@ -50,13 +50,13 @@ func gen_hash(url string) string{
}
func correct_url(url string) string {
- if(len(url) <= 7) {
- return "https://" + url;
+ if(url[:7] == "https:/") {
+ return "https://" + url[7:];
}
- if(url[:8] != "https://") {
- return "https://" + url;
+ if(url[:6] == "http:/") {
+ return "http://" + url[:6];
}
- return url;
+ return "https://" + url;
}
func add_url(url string) string{