Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
RelayServer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vaclab
RelayServer
Commits
29847f30
Commit
29847f30
authored
6 years ago
by
Rolf Niepraschk
Browse files
Options
Downloads
Patches
Plain Diff
better test of Body (action "HTTP")
parent
6a146403
No related branches found
No related tags found
No related merge requests found
Pipeline
#14222
failed
6 years ago
Stage: build
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config.js
+5
-3
5 additions, 3 deletions
config.js
http.js
+11
-1
11 additions, 1 deletion
http.js
package.json
+1
-1
1 addition, 1 deletion
package.json
with
17 additions
and
5 deletions
config.js
+
5
−
3
View file @
29847f30
/**
/**
* @author Rolf Niepraschk (Rolf.Niepraschk@ptb.de)
* @author Rolf Niepraschk (Rolf.Niepraschk@ptb.de)
* version: 2018-
08-2
1
* version: 2018-
10-0
1
*/
*/
var
fs
=
require
(
'
fs
'
);
var
fs
=
require
(
'
fs
'
);
...
@@ -8,10 +8,12 @@ var fs = require('fs');
...
@@ -8,10 +8,12 @@ var fs = require('fs');
/**
/**
* Datenstruktur mit Default-Werten
* Datenstruktur mit Default-Werten
*/
*/
// TODO: Get VERSION & DATE from "package.json"
var
cfg
=
{
var
cfg
=
{
// Nur wenn sie mit '?' beginnt, wird Eintrag aus "package.json" verwendet
// Nur wenn sie mit '?' beginnt, wird Eintrag aus "package.json" verwendet
VERSION
:
'
12.11.
2
'
,
VERSION
:
'
12.11.
3
'
,
DATE
:
'
2018-
04-18
'
,
DATE
:
'
2018-
10-01
'
,
RELAY_PORT
:
55555
,
RELAY_PORT
:
55555
,
WEBSOCKET_PORT
:
9001
,
WEBSOCKET_PORT
:
9001
,
DEFAULT_EXEC_TIMEOUT
:
60000
,
// msec
DEFAULT_EXEC_TIMEOUT
:
60000
,
// msec
...
...
This diff is collapsed.
Click to expand it.
http.js
+
11
−
1
View file @
29847f30
...
@@ -21,9 +21,19 @@ var logger = cfg.logger;
...
@@ -21,9 +21,19 @@ var logger = cfg.logger;
*/
*/
function
call
(
pRef
,
js
)
{
function
call
(
pRef
,
js
)
{
var
host
=
url
.
parse
(
js
.
Url
).
hostname
;
var
host
=
url
.
parse
(
js
.
Url
).
hostname
;
var
method
=
js
.
Method
?
js
.
Method
:
(
js
.
Body
?
'
POST
'
:
'
GET
'
)
;
var
method
;
var
json
=
js
.
Json
||
false
;
var
json
=
js
.
Json
||
false
;
var
proxy
=
process
.
env
.
http_proxy
;
var
proxy
=
process
.
env
.
http_proxy
;
if
(
js
.
Body
)
{
method
=
'
POST
'
;
if
(
typeof
js
.
Body
!=
'
string
'
&&
typeof
js
.
Body
!=
'
Buffer
'
)
{
response
.
prepareError
(
pRef
,
js
,
'
Body must be of type string or Buffer!
'
);
return
;
}
}
else
{
method
=
'
GET
'
;
}
if
(
process
.
env
.
no_proxy
)
{
if
(
process
.
env
.
no_proxy
)
{
var
np
=
process
.
env
.
no_proxy
.
split
(
'
,
'
);
var
np
=
process
.
env
.
no_proxy
.
split
(
'
,
'
);
for
(
var
i
=
0
;
i
<
np
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
np
.
length
;
i
++
)
{
...
...
This diff is collapsed.
Click to expand it.
package.json
+
1
−
1
View file @
29847f30
{
{
"name"
:
"relayServer"
,
"name"
:
"relayServer"
,
"version"
:
"12.
7.4
"
,
"version"
:
"12.
11.3
"
,
"description"
:
"Nodejs-basierter http-Server für Messaufgaben"
,
"description"
:
"Nodejs-basierter http-Server für Messaufgaben"
,
"author"
:
{
"author"
:
{
"name"
:
"Rolf Niepraschk"
,
"name"
:
"Rolf Niepraschk"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment