I am running go version go1.12.1 windows/amd64
my laptop is windows 10 64 bit
I have written a GO program to act as a CGI script under my Apache web server
A FORM on my web page submitted a POST method request to the GOlang CGI script program.
To my surprise the blanks in the data field were changed to blanks.
I used bufio.NewReader to read in the standard input containing the POST method data as follows
reader := bufio.NewReader(os.Stdin)
for {
looptext, _ := reader.ReadString('\n')
count := len(looptext)
if count == 0 {
break
}
post_data += looptext + "\n"
post_vars := strings.Split(looptext, "&")
for _, pvar := range post_vars {
pair := strings.SplitN(pvar, "=", 2)
fields_count += 1
fields_map[pair[0]] = pair[1]
}
} // FOR over lines of POST data
Why were the blanks changed to plus signs ? So far Google searching has not found anything