Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
2a917955
Commit
2a917955
authored
Mar 15, 2018
by
echicken
Browse files
Ditch the 'self' stuff and give forEach a thisArg instead.
parent
95f4ca46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
exec/load/http.js
exec/load/http.js
+2
-3
No files found.
exec/load/http.js
View file @
2a917955
...
...
@@ -46,11 +46,10 @@ HTTPRequest.prototype.AddDefaultHeaders=function(){
HTTPRequest
.
prototype
.
AddExtraHeaders
=
function
()
{
if
(
typeof
this
.
extra_headers
!==
'
object
'
)
return
;
var
self
=
this
;
Object
.
keys
(
this
.
extra_headers
).
forEach
(
function
(
e
)
{
self
.
request_headers
.
push
(
e
+
'
:
'
+
self
.
extra_headers
[
e
]);
}
this
.
request_headers
.
push
(
e
+
'
:
'
+
this
.
extra_headers
[
e
]);
}
,
this
);
};
...
...
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