summaryrefslogtreecommitdiff
path: root/main_server.go
diff options
context:
space:
mode:
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{