-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
not work with multipary/form-data boundary include slash #5
Labels
Comments
The
I hope this helps! |
solved, thanks for your reply! |
This was referenced Dec 7, 2016
facebook-github-bot
pushed a commit
to facebook/react-native
that referenced
this issue
Dec 14, 2016
Summary: some server not work when upload a file with FromData in ios. the reason is that there is a slash in boundary, like: ``` multipart/form-data; boundary=b/QeEbFgqK9PCZo4T/eXv7f.T74SHd5MxCZ846AsTz-yNV0xrRR_Zks4fkNMCzJck9ZE8o // koa request.js (line 548) is(types) { if (!types) return typeis(this.req); if (!Array.isArray(types)) types = [].slice.call(arguments); return typeis(this.req, types); } // type-is index.js (line 237) function normalizeType (value) { // parse the type var type = typer.parse(value) // remove the parameters type.parameters = undefined // reformat it return typer.format(type) } // media-typer var paramRegExp = /; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g; ``` thanks for dougwilson 's [answer](jshttp/media-typer#5). > The / is an illegal character for Content-Type, which is what this module parses Closes #11342 Differential Revision: D4326750 Pulled By: javache fbshipit-source-id: b1c78a335c95a5c223537545d87beaffe15d673d
DanielMSchmidt
pushed a commit
to DanielMSchmidt/react-native
that referenced
this issue
Jan 4, 2017
Summary: some server not work when upload a file with FromData in ios. the reason is that there is a slash in boundary, like: ``` multipart/form-data; boundary=b/QeEbFgqK9PCZo4T/eXv7f.T74SHd5MxCZ846AsTz-yNV0xrRR_Zks4fkNMCzJck9ZE8o // koa request.js (line 548) is(types) { if (!types) return typeis(this.req); if (!Array.isArray(types)) types = [].slice.call(arguments); return typeis(this.req, types); } // type-is index.js (line 237) function normalizeType (value) { // parse the type var type = typer.parse(value) // remove the parameters type.parameters = undefined // reformat it return typer.format(type) } // media-typer var paramRegExp = /; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g; ``` thanks for dougwilson 's [answer](jshttp/media-typer#5). > The / is an illegal character for Content-Type, which is what this module parses Closes facebook#11342 Differential Revision: D4326750 Pulled By: javache fbshipit-source-id: b1c78a335c95a5c223537545d87beaffe15d673d
gre
pushed a commit
to gre/react-native
that referenced
this issue
Jan 10, 2017
Summary: some server not work when upload a file with FromData in ios. the reason is that there is a slash in boundary, like: ``` multipart/form-data; boundary=b/QeEbFgqK9PCZo4T/eXv7f.T74SHd5MxCZ846AsTz-yNV0xrRR_Zks4fkNMCzJck9ZE8o // koa request.js (line 548) is(types) { if (!types) return typeis(this.req); if (!Array.isArray(types)) types = [].slice.call(arguments); return typeis(this.req, types); } // type-is index.js (line 237) function normalizeType (value) { // parse the type var type = typer.parse(value) // remove the parameters type.parameters = undefined // reformat it return typer.format(type) } // media-typer var paramRegExp = /; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g; ``` thanks for dougwilson 's [answer](jshttp/media-typer#5). > The / is an illegal character for Content-Type, which is what this module parses Closes facebook#11342 Differential Revision: D4326750 Pulled By: javache fbshipit-source-id: b1c78a335c95a5c223537545d87beaffe15d673d
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this is not working
this ok
The text was updated successfully, but these errors were encountered: