// FinishURI writes a '201 URI Done' message.
FinishURI writes a '201 URI Done' message.
// FinishURI writes a ' 201 URI Done ' message .
func (mw *MessageWriter) FinishURI(uri, filename, resumePoint, altIMSHit string,
	imsHit, usedMirror bool, extra ...Field) {
	fmt.Fprintf(mw.w, "201 URI Done\nURI: %s\nFilename: %s\n", uri, filename)
	if resumePoint != "" {
		fmt.Fprintf(mw.w, "Resume-Point: %s\n", resumePoint)
	}
	if imsHit {
		mw.w.Write([]byte("IMS-Hit: true\n"))
	}
	if altIMSHit != "" {
		fmt.Fprintf(mw.w, "Alt-IMS-Hit: %s\n", altIMSHit)
	}
	if usedMirror {
		mw.w.Write([]byte("UsedMirror: true\n"))
	}
	for _, s := range extra {
		fmt.Fprintf(mw.w, "%s: %s\n", s.Key, s.Value)
	}
	mw.w.Write([]byte("\n"))
}
func ( mw * MessageWriter ) FinishURI ( uri , filename , resumePoint , altIMSHit string , imsHit , usedMirror bool , extra ... Field ) { fmt . Fprintf ( mw . w , " \n \n \n " , uri , filename ) if resumePoint != " " { fmt . Fprintf ( mw . w , " \n " , resumePoint ) } if imsHit { mw . w . Write ( [ ] byte ( " \n " ) ) } if altIMSHit != " " { fmt . Fprintf ( mw . w , " \n " , altIMSHit ) } if usedMirror { mw . w . Write ( [ ] byte ( " \n " ) ) } for _ , s := range extra { fmt . Fprintf ( mw . w , " \n " , s . Key , s . Value ) } mw . w . Write ( [ ] byte ( " \n " ) ) }
FinishURI writes a '201 URI Done' message.
FinishURI writes a ' 201 URI Done ' message .
// TODO: Make this better...