Permalink
Browse files

Merge pull request #2 from peritus/submit-fix-hostname

make .submit(url) use host from url, not 'localhost'
  • Loading branch information...
2 parents 007de64 + 8150a39 commit 6431c10e8927798f6c918da3a311bbdf25b23e65 @felixge felixge committed Jul 18, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/form_data.js
View
@@ -160,6 +160,7 @@ FormData.prototype.submit = function(url, cb) {
port: parsedUrl.port || 80,
path: parsedUrl.pathname,
headers: this.getHeaders({'Content-Length': length}),
+ host: parsedUrl.hostname
});
this.pipe(request);

0 comments on commit 6431c10

Please sign in to comment.