Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
node-http-proxy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
node-http-proxy
Commits
34cba38c
Commit
34cba38c
authored
Dec 07, 2010
by
indexzero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] Fixed cli parsing issue when --argument=value is not used
parent
8ef2e1fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
bin/node-http-proxy
bin/node-http-proxy
+7
-4
No files found.
bin/node-http-proxy
View file @
34cba38c
...
...
@@ -17,10 +17,10 @@ var help = [
"
--config OUTFILE Location of the configuration file for the proxy server
"
,
"
--silent Silence the log output from the proxy server
"
,
"
-h, --help You're staring at it
"
];
]
.
join
(
'
\n
'
)
;
if
(
argv
.
h
||
argv
.
help
||
Object
.
keys
(
argv
).
length
===
2
)
{
util
.
puts
(
help
.
join
(
'
\n
'
)
);
util
.
puts
(
help
);
process
.
exit
(
0
);
}
...
...
@@ -49,7 +49,7 @@ config.silent = typeof argv.silent !== 'undefined' ? argv.silent : config.silent
//
// If we were passed a target, parse the url string
//
if
(
t
arget
)
location
=
target
.
split
(
'
:
'
);
if
(
t
ypeof
target
===
'
string
'
)
location
=
target
.
split
(
'
:
'
);
//
// Create the server with the specified options
...
...
@@ -59,9 +59,12 @@ if (location) {
var
targetPort
=
location
.
length
===
1
?
80
:
location
[
1
];
server
=
httpProxy
.
createServer
(
targetPort
,
location
[
0
],
config
);
}
else
{
else
if
(
config
.
router
)
{
server
=
httpProxy
.
createServer
(
config
);
}
else
{
return
util
.
puts
(
help
);
}
//
// Start the server
...
...
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