kurly:master

Last commit made on 2018-06-12
Get this branch:
git clone -b master https://git.launchpad.net/kurly

Branch merges

Branch information

Name:
master
Repository:
lp:kurly

Recent commits

39868f2... by David J Peacock <email address hidden>

clean up

f118f99... by David J Peacock <email address hidden>

migration to GitLab message

7e762cb... by Akilan Elango <email address hidden>

fix the URL sanitizing in reference to Issue #95

4edbc33... by Felix Yan

Fix a typo in kurly.man

84b0de0... by Akilan Elango <email address hidden>

Fix Imports : davidjpeacock/cli -> urfave/cli

7cf4403... by Akilan Elango <email address hidden>

In reference to Issue #105 : File input with the --data flag doesn't work
 * In ProcessData function, if the --data flag is passed with a filename
   only, it is not included in the data. The file (@filename) is
   included only when a key is passed. ie.,
          --data "<email address hidden>" // This is processed.
   And when the --data flag is passed with just the filename without a
   key, like :
          --data "@some.json" // This is ignored.
   Thus adding functionality to read the file in case the key is not
   given.
 * Header parsing : Header is added only when a particuar format is
   followed : "Key: Value". But curl also accepts "Key:Value" (without
   the space near the colon". Modified setHeaders function to follow
   curl's standards

6db4663... by Akilan Elango <email address hidden>

fixed : printing the final response headers twice
      * once in the fetchUrl of main.go
      * once in the checkRedirect http.Client hook function
when the -L (follow redirects) flag is not specified

fc0b1a8... by Akilan Elango <email address hidden>

fix Issue #100 : print the headers of a redirecting response

ae42183... by Akilan Elango <email address hidden>

Issue #95 : rebuild URL when the URL has a trailing slash by adding the upload filename

Request Type : "PUT"

01ae088... by Akilan Elango <email address hidden>

fix : upload-file

detailed : before refactoring (commit : 4f41de52de137241bcd3ea0a7e1d5ee7437fb0ff), the body
was a global variable (io.Reader). So the scope of that variable was till the end of the program.
But after refactoring the body was moved to a function as a local variable and passed around like a
reference (which is not possible in Go for interfaces). So the body variable will stay as nil and no
content is uploaded at all. Now the functions where the body was passed were rewrote so that they
return a io.Reader and can be stored locally in that function itself.