久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <tfoot id='KyZtY'></tfoot>
  • <small id='KyZtY'></small><noframes id='KyZtY'>

        <legend id='KyZtY'><style id='KyZtY'><dir id='KyZtY'><q id='KyZtY'></q></dir></style></legend>
          <bdo id='KyZtY'></bdo><ul id='KyZtY'></ul>
      1. <i id='KyZtY'><tr id='KyZtY'><dt id='KyZtY'><q id='KyZtY'><span id='KyZtY'><b id='KyZtY'><form id='KyZtY'><ins id='KyZtY'></ins><ul id='KyZtY'></ul><sub id='KyZtY'></sub></form><legend id='KyZtY'></legend><bdo id='KyZtY'><pre id='KyZtY'><center id='KyZtY'></center></pre></bdo></b><th id='KyZtY'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='KyZtY'><tfoot id='KyZtY'></tfoot><dl id='KyZtY'><fieldset id='KyZtY'></fieldset></dl></div>

        XMLHttpRequest multipart/form-data:多部分中的邊界無效

        XMLHttpRequest multipart/form-data: Invalid boundary in multipart(XMLHttpRequest multipart/form-data:多部分中的邊界無效)
        1. <legend id='f7hEN'><style id='f7hEN'><dir id='f7hEN'><q id='f7hEN'></q></dir></style></legend>

          <small id='f7hEN'></small><noframes id='f7hEN'>

                <bdo id='f7hEN'></bdo><ul id='f7hEN'></ul>

                1. <tfoot id='f7hEN'></tfoot>

                  <i id='f7hEN'><tr id='f7hEN'><dt id='f7hEN'><q id='f7hEN'><span id='f7hEN'><b id='f7hEN'><form id='f7hEN'><ins id='f7hEN'></ins><ul id='f7hEN'></ul><sub id='f7hEN'></sub></form><legend id='f7hEN'></legend><bdo id='f7hEN'><pre id='f7hEN'><center id='f7hEN'></center></pre></bdo></b><th id='f7hEN'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='f7hEN'><tfoot id='f7hEN'></tfoot><dl id='f7hEN'><fieldset id='f7hEN'></fieldset></dl></div>

                    <tbody id='f7hEN'></tbody>
                2. 本文介紹了XMLHttpRequest multipart/form-data:多部分中的邊界無效的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我正在通過 XMLHttpRequest 發(fā)送帖子數(shù)據(jù):

                  I am sending post data via XMLHttpRequest:

                  var xmlHttp=new XMLHttpRequest();
                  xmlHttp.open("POST", domain, true);
                  xmlHttp.setRequestHeader("Content-type","multipart/form-data");
                  var formData = new FormData();  
                  formData.append("data", data_json_string);
                  xmlHttp.send(formData);
                  

                  在 Python 中,如果我嘗試獲取 POST(或 FILES 或其他任何內(nèi)容)數(shù)據(jù),則會出現(xiàn)錯誤:

                  In Python, I get an error if I try to get the POST (or FILES or anything) data:

                  MultiPartParserError: Invalid boundary in multipart: None
                  

                  這永遠(yuǎn)行不通嗎?我真的需要將表單主體創(chuàng)建為單個字符串,在其中循環(huán)遍歷參數(shù)并在每個參數(shù)之前和之后放置一個邊界字符串嗎?如果是這樣,那應(yīng)該是什么樣子?如何從 Python 中的 POST 中獲取它?或者有沒有更簡單的方法.我環(huán)顧四周,并沒有找到太多關(guān)于此的內(nèi)容.

                  Can this never work?? Do I really need to create the form body as a single string where I loop through the parameters and place a boundary string before and after each one? And, if so, what should that look like? How do I get it from my POST in Python?? Or is there an easier way. I'm looking around and not finding much on this.

                  順便說一句,我正在使用multipart/form-data",因為我的字符串?dāng)?shù)據(jù)非常長,這是一種更快的發(fā)送方式.當(dāng)我創(chuàng)建表單并將其發(fā)布到 iframe 時,它??對我有用.但是這里我更喜歡xmlHttp.

                  btw, I am using "multipart/form-data" because my string data is really long and this is a faster way to send it. It has worked for me when I create a form and post it, targeting it to an iframe. But here I much prefer xmlHttp.

                  推薦答案

                  不要自己設(shè)置 Content-Type 標(biāo)頭..send()數(shù)據(jù)時會正確設(shè)置,包括正確生成的邊界,這是您手動生成的標(biāo)題所缺少的.

                  Do not set the Content-Type header yourself. It will be properly set when .send()ing the data, including the proper generated boundary, which your manually generated header lacks.

                  規(guī)范明確指出 .send(FormData) 將使用 multipart/form-data 編碼.

                  The spec clearly states that .send(FormData) will use multipart/form-data encoding.

                  如果數(shù)據(jù)是 FormData

                  If data is a FormData

                  令請求實(shí)體主體為運(yùn)行multipart/form-data編碼算法的結(jié)果,數(shù)據(jù)為表單數(shù)據(jù)集,UTF-8為顯式字符編碼.

                  Let the request entity body be the result of running the multipart/form-data encoding algorithm with data as form data set and with UTF-8 as the explicit character encoding.

                  設(shè)mime type為multipart/form-data;"、一個U+0020空格字符、boundary="和multipart/form-data編碼算法生成的multipart/form-data邊界字符串的串聯(lián).

                  Let mime type be the concatenation of "multipart/form-data;", a U+0020 SPACE character, "boundary=", and the multipart/form-data boundary string generated by the multipart/form-data encoding algorithm.

                  這篇關(guān)于XMLHttpRequest multipart/form-data:多部分中的邊界無效的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調(diào)用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調(diào)用完成)
                  JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                  XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標(biāo)頭) - IT屋-程序員軟件開發(fā)技術(shù)分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                  NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 異常 101)
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內(nèi)容)

                    <tbody id='8M4Jf'></tbody>
                  <i id='8M4Jf'><tr id='8M4Jf'><dt id='8M4Jf'><q id='8M4Jf'><span id='8M4Jf'><b id='8M4Jf'><form id='8M4Jf'><ins id='8M4Jf'></ins><ul id='8M4Jf'></ul><sub id='8M4Jf'></sub></form><legend id='8M4Jf'></legend><bdo id='8M4Jf'><pre id='8M4Jf'><center id='8M4Jf'></center></pre></bdo></b><th id='8M4Jf'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='8M4Jf'><tfoot id='8M4Jf'></tfoot><dl id='8M4Jf'><fieldset id='8M4Jf'></fieldset></dl></div>
                    <bdo id='8M4Jf'></bdo><ul id='8M4Jf'></ul>
                  • <legend id='8M4Jf'><style id='8M4Jf'><dir id='8M4Jf'><q id='8M4Jf'></q></dir></style></legend>

                      • <small id='8M4Jf'></small><noframes id='8M4Jf'>

                          1. <tfoot id='8M4Jf'></tfoot>
                          2. 主站蜘蛛池模板: 日韩欧美精品在线 | 欧美乱大交xxxxx另类电影 | 91久久北条麻妃一区二区三区 | 日日干综合| 国产一区二区激情视频 | 91传媒在线观看 | 成人av色 | 91精品国产综合久久福利软件 | 亚洲一区二区三区四区五区中文 | 天天草av| 久久综合久色欧美综合狠狠 | 超碰在线观看97 | 国产一区二区视频免费在线观看 | 凹凸日日摸日日碰夜夜 | 久久人人网| 国产精品自拍视频 | 自拍偷拍精品 | 亚洲精品一区二三区不卡 | 亚洲人成人一区二区在线观看 | 在线观看免费av网 | 亚洲精品日韩欧美 | 精品丝袜在线 | 日韩精品一区二区三区中文字幕 | 综合五月 | 日本天堂视频在线观看 | 亚州视频在线 | 国产激情一区二区三区 | 欧美一级二级在线观看 | 老司机精品福利视频 | 国产伦精品一区二区 | 国产一级影片 | caoporn地址| 色婷婷亚洲国产女人的天堂 | 精品视频免费在线 | 婷婷色网| 夜色www国产精品资源站 | 99久久精品视频免费 | 久草网站 | 日韩一级精品视频在线观看 | 91av免费版| 夜夜爽夜夜操 |