Skip to content

Commit

Permalink
Partially addressed review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
parthverma1 committed Jul 10, 2024
1 parent 947ddc2 commit 77ebb18
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function initParams (uri, options, callback) {
}

// Disable flow when running in browser
if (!tls.connect) {
if (typeof window !== 'undefined' && window.XMLHttpRequest) {
params.protocolVersion = 'http1'
}

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/http2/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { Http2Agent, globalAgent } = require('./http2Agent')
const { Http2Agent, globalAgent } = require('./agent')
const { request } = require('./request')

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion lib/http2/request.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const url = require('url')
const http2 = require('http2')
const { EventEmitter } = require('events')
const { globalAgent } = require('./http2Agent')
const { globalAgent } = require('./agent')
const { assertValidPseudoHeader, checkIsHttpToken } = require('../autohttp/utils/headers')

function httpOptionsToUri (options) {
Expand Down
2 changes: 0 additions & 2 deletions lib/redirect.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,6 @@ Redirect.prototype.onResponse = function (response) {

request.emit('redirect')

options.protocolVersion = this.request.protocolVersion

// Wait for request to end before firing redirect request
request._redirectPromise
.then(() => {
Expand Down

0 comments on commit 77ebb18

Please sign in to comment.