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

前端 未结 4 1369
刺人心
刺人心 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:49

    The number of dashes depends on how many you want there. It can be zero, if you like -- it's just that more dashes makes the boundary more obvious.

    The boundary consists of a line containing two dashes plus everything after "boundary=". So if your header said boundary=ABC, the boundary looks like

    --ABC
    

提交回复
热议问题