Documentation ¶
Overview ¶
rewrite multipart reader for compatibility with invalid boundary
Index ¶
- Constants
- Variables
- func BytesJoinSize(size int, s ...[]byte) []byte
- func NewWriter(w io.Writer) *multipart.Writer
- type Part
- func (p *Part) FileName(stricts ...bool) string
- func (p *Part) FormName(stricts ...bool) string
- func (p *Part) GetHeader(key string, canonicals ...bool) string
- func (p *Part) NoBody() bool
- func (p *Part) NoEmptyLineDivider() bool
- func (p *Part) Read(data []byte) (n int, err error)
- func (p *Part) ReadRawHeader() ([]byte, error)
- func (p *Part) SetNoBody(noBody bool)
- func (p *Part) SetNoEmptyLineDivider(b bool)
- type Reader
- type Writer
Constants ¶
View Source
const ( FINDING_BOUNDARY = 0 BOUNDARY_MATCHED = 1 PARSING_BLOCK_HEADER = iota PARSING_BLOCK_BODY PART_FINISHED FINISHED )
Variables ¶
View Source
var ( CRLF = []byte("\r\n") LF = []byte("\n") ErrInvalidBoundary = utils.Error("multipart: invalid boundary") )
Functions ¶
func BytesJoinSize ¶
Types ¶
type Part ¶
type Part struct { Header textproto.MIMEHeader // contains filtered or unexported fields }
func (*Part) NoEmptyLineDivider ¶
func (*Part) ReadRawHeader ¶
func (*Part) SetNoEmptyLineDivider ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func NewReaderWithString ¶
func (*Reader) NextRawPart ¶
Click to show internal directories.
Click to hide internal directories.