I'm using TLS/http/gorillamux golang web server.

strSomeFileName := "blah.json" //"blah.txt" // "blah.bin"
w.Header().Set("Content-Type","application/octet-stream") 
w.Header().Set("Content-Disposition", "attachment;filename=" + 
strSomeFileName)
myCmdOutput, _ := cmd.Output()

//with or without following line, it still doesnt display the 
"file->save..." dialog in the web browser
//w.Header().Set("Content-Length", strconv.Ito( len(myCmdOutput) ) )

w.Write(myCmdOutput)

Does anyone have any hints as to what I'm missing?

Thank you and cheers.

David Marceau

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to