(b []byte)
| 340 | } |
| 341 | |
| 342 | func (c *aeContext) Write(b []byte) (int, error) { |
| 343 | if c.outCode == 0 { |
| 344 | c.WriteHeader(http.StatusOK) |
| 345 | } |
| 346 | if len(b) > 0 && !bodyAllowedForStatus(c.outCode) { |
| 347 | return 0, http.ErrBodyNotAllowed |
| 348 | } |
| 349 | c.outBody = append(c.outBody, b...) |
| 350 | return len(b), nil |
| 351 | } |
| 352 | |
| 353 | func (c *aeContext) WriteHeader(code int) { |
| 354 | if c.outCode != 0 { |