Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
1c44ef2b
Commit
1c44ef2b
authored
May 30, 2017
by
Levi Cameron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements to code clarity
parent
94c37c09
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
rest_framework/static/rest_framework/js/ajax-form.js
+3
-1
No files found.
rest_framework/static/rest_framework/js/ajax-form.js
View file @
1c44ef2b
...
...
@@ -40,8 +40,10 @@ function doAjaxSubmit(e) {
if
(
contentType
===
'multipart/form-data'
)
{
// We need to add a boundary parameter to the header
// We assume the first valid-looking boundary line in the body is correct
// regex is from RFC 2046 appendix A
var
re
=
/^--
([
0-9A-Z'()+_,-.
/
:=?
]{1,70})[
\f\t\v\u
00a0
\u
1680
\u
180e
\u
2000-
\u
200a
\u
2028
\u
2029
\u
202f
\u
205f
\u
3000
\u
feff
]
*$/im
;
var
boundary
=
re
.
exec
(
data
);
var
boundary
=
data
.
match
(
re
);
if
(
boundary
!==
null
)
{
contentType
+=
'; boundary="'
+
boundary
[
1
]
+
'"'
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment