Dear All: I'm working on implementing the server side of the protocol of object server of OpenStack Swift. It is overlaid onto HTTP and when PUT request is processed, the server replies with headers like these:
HTTP/1.1 100 Continue X-Obj-Multiphase-Commit: yes X-Obj-Metadata-Footer: yes However, the package http in Go does this: func (ecr *expectContinueReader) Read(p []byte) (n int, err error) { if ecr.closed { return 0, ErrBodyReadAfterClose } if !ecr.resp.wroteContinue && !ecr.resp.conn.hijacked() { ecr.resp.wroteContinue = true ecr.resp.conn.bufw.WriteString("HTTP/1.1 100 Continue\r\n\r\n") ecr.resp.conn.bufw.Flush() } n, err = ecr.readCloser.Read(p) (in https://golang.org/src/net/http/server.go) I need to override this behavior somehow and add my headers. Is hijacking the only way to do it? Thanks in advance, -- Pete -- 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 golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.