~andychilton/goamz/aws-fix-for-r60

« back to all changes in this revision

Viewing changes to aws.go

  • Committer: Gustavo Niemeyer
  • Date: 2011-08-25 02:13:52 UTC
  • Revision ID: gustavo@niemeyer.net-20110825021352-e2f4e4zlz1fmf4u9
Renamed new Sencode func to Encode. Added tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
        return
83
83
}
84
84
 
85
 
// Sencode takes a string and URI encodes it. There doesn't seem to be anything
86
 
// in 'http' we can use for this! :(
87
 
func Sencode(s string) string {
 
85
// Encode takes a string and URI-encodes it in a way suitable
 
86
// to be used in AWS signatures.
 
87
func Encode(s string) string {
88
88
        encode := false
89
89
        for i := 0; i != len(s); i++ {
90
90
                c := s[i]