如何转义Multipart HTTP边界 [英] How to escape Multipart HTTP boundary
本文介绍了如何转义Multipart HTTP边界的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我正在发送多部分请求(或响应)。我需要选择一个多部分边界,它不会出现在我的任何有效载荷中。但是,我的有效负载是大型二进制文件,我将它们流式传输到目的地。我想避免两次流式传输 - 一次扫描边界,一次流出。
Let's say I'm sending a multipart request (or response). I need to choose a multipart boundary which does not appear in any of my payloads. However, my payloads are large binary files and I am streaming them to the destination. I want to avoid streaming them twice - once to scan for the boundary and one to stream out.
所以我的问题是:如果出现边界是否有可能逃脱边界在有效载荷?如果是这样,怎么样?
So my question is: is it possible to escape the boundary if it appears in the payload? If so, how?
推荐答案
这篇关于如何转义Multipart HTTP边界的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文