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
eb39018f
Commit
eb39018f
authored
Sep 07, 2010
by
indexzero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[api] Integrated a little more from Mikeal to make our return headers consistent
parent
6d08f24c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
lib/node-http-proxy.js
lib/node-http-proxy.js
+5
-1
No files found.
lib/node-http-proxy.js
View file @
eb39018f
...
...
@@ -81,7 +81,6 @@ var createProxy = function () {
server
.
emit
(
'
route
'
,
req
,
res
,
function
(
port
,
hostname
)
{
var
p
=
manager
.
getPool
(
port
,
hostname
);
req
.
headers
.
Connection
=
req
.
headers
.
Connection
||
'
close
'
;
p
.
request
(
req
.
method
,
req
.
url
,
req
.
headers
,
function
(
reverse_proxy
)
{
var
data
=
''
;
reverse_proxy
.
on
(
'
error
'
,
function
(
err
)
{
...
...
@@ -113,6 +112,11 @@ var createProxy = function () {
// Add a listener for the reverse_proxy response event
reverse_proxy
.
addListener
(
'
response
'
,
function
(
response
)
{
if
(
response
.
headers
.
connection
)
{
if
(
req
.
headers
.
connection
)
response
.
headers
.
connection
=
req
.
headers
.
connection
;
else
response
.
headers
.
connection
=
'
close
'
;
}
// These two listeners are for testability and observation
// of what's passed back from the target server
response
.
addListener
(
'
data
'
,
function
(
chunk
)
{
...
...
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