fix generate_boundary #14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replace standard base64 encoding with URL safe version for generating boundary which only consists of alphanumeric US-ASCII characters, underscore and -
Despite = being allowed, many multipart implementations do not quote boundary in Content-Type, so it is safe to remove = from result.
'/' apparently also can be a problem in some implementations if unquoted in the header.
I'd prefer to map "=" onto "-" (which occurs always at the end, and I've seen examples in the RFCs with hyphens at the end and the grammar certainly allows that) and map "/" onto "." (which seems the next least problematic character) and leave the "+" from standard base64 as is. That way the boundaries remain unique since those characters were not used yet, and we preserve the can-never-repeat property of textnonce.
Let me know if that is satisfactory.
Now I made = to - and / to .