vkuznet / transfer2go

Distributed, loosely couple agent-based transferring system
MIT License
8 stars 2 forks source link

Do not try to parse certificate when auth=false #58

Closed rishiloyola closed 6 years ago

rishiloyola commented 6 years ago

I am facing following error while testing the code using run.sh script. screen shot 2017-10-14 at 8 19 33 pm

Since given path does not exist it is throwing an error.

vkuznet commented 6 years ago

Rishi, the PR is incomplete. Either you switch to global AUTH variable everywhere or do not use it. You made a partial switch. For instance, server/handler.go code uses authVar https://github.com/vkuznet/transfer2go/blob/master/server/handlers.go#L28 https://github.com/vkuznet/transfer2go/blob/master/server/handlers.go#L74 https://github.com/vkuznet/transfer2go/blob/master/server/handlers.go#L84 If you need global AUTH, then fix the whole code accordingly and not only sub-parts.

rishiloyola commented 6 years ago

I just want to limit that variable between server and utils package. Shall I rename AUTH to Auth or I need to replace authvar by utils.AUTH?

vkuznet commented 6 years ago

Make everything consistent, utils.Auth will fit well and use it everywhere. The Init function can be simplified and no longer need authArg since utils.Auth can be used instead. Then replace authVar in server code with utils.Auth.

On 0, Rishi notifications@github.com wrote:

I just want to limit that variable between server and utils package. Shall I rename AUTH to Auth or I need to replace authvar by utils.AUTH?

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/vkuznet/transfer2go/pull/58#issuecomment-336641535

rishiloyola commented 6 years ago

@vkuznet made the necessary changes. You can merge this.