What is the '-' in multipart/form-data?

前端 未结 4 1337
刺人心
刺人心 2020-12-30 04:06

I want to ask a question about the multipart/form data. I find the http header of multipart post and the Content-Type: multipart/form-data; boundary=-----...---boundaryNumbe

4条回答
  •  伪装坚强ぢ
    2020-12-30 04:59

    In your boundary definition, no hyphens are required. When using that boundary to separate two distinct body parts, you must start with two hyphens, followed by your previously-defined boundary string.

    This is explained in RFC 1341 (MIME), and you can find additional information there in the Multipart section (as linked).

提交回复
热议问题