Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mikeal/request
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeal committed Aug 23, 2011
2 parents 01bc25d + 57b3d60 commit d487131
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ Request.prototype.request = function () {
if (options.ntick) throw new Error("You cannot pipe to this stream after the first nextTick() after creation of the request stream.")
options.src = src
if (isReadStream(src)) {
options.headers['content-type'] = mimetypes.lookup(src.path.slice(src.path.lastIndexOf('.')+1))
if (!options.headers['content-type'] && !options.headers['Content-Type'])
options.headers['content-type'] = mimetypes.lookup(src.path.slice(src.path.lastIndexOf('.')+1))
} else {
if (src.headers) {
for (i in src.headers) {
Expand Down

0 comments on commit d487131

Please sign in to comment.