~psic4t/qcal

0a97b21433e62c563d3e54ba27627bb47df48b99 — psic4t 5 months ago c0b9254 0.8.8
fix HTTP call for readonly servers
3 files changed, 7 insertions(+), 3 deletions(-)

M defines.go
M main.go
M parse.go
M defines.go => defines.go +1 -1
@@ 24,7 24,7 @@ var endDateUTC string
var summary string
var toFile bool
var elements []Event
var qcalversion string = "0.8.7"
var qcalversion string = "0.8.8"

var colorBlock string = "|"
var currentDot string = "•"

M main.go => main.go +5 -1
@@ 26,7 26,11 @@ func fetchCalData(calNo int, wg *sync.WaitGroup) {
		    </c:calendar-query>`

	//fmt.Println(xmlBody)
	req, err := http.NewRequest("REPORT", config.Calendars[calNo].Url, strings.NewReader(xmlBody))
	reqType := "REPORT"
	if config.Calendars[calNo].Username == "" {
		reqType = "GET"
	}
	req, _ := http.NewRequest(reqType, config.Calendars[calNo].Url, strings.NewReader(xmlBody))
	req.SetBasicAuth(config.Calendars[calNo].Username, config.Calendars[calNo].Password)
	req.Header.Add("Content-Type", "application/xml; charset=utf-8")
	req.Header.Add("Depth", "1") // needed for SabreDAV

M parse.go => parse.go +1 -1
@@ 47,7 47,7 @@ func splitIcal(ical string) []string {
		fmt.Println(i)
		fmt.Println(Events[i])
	}*/
	//fmt.Println(splits[21])
	//fmt.Println(Events[1])
	//os.Exit(1)
	return Events
}