Skip to content

Failure when server response header is not valid #9

Description

@yeudit

Hey,

I'm using your module and when tried to make a request I got an exception:

TypeError: Cannot read property 'length' of null
at parseChallenge [as _parseChallenge] /home/yeudit/workspace/att/breeze/System/core/node_modules/http-digest-client/http-digest-client.js:112:15
at handleResponse [as _handleResponse] /home/yeudit/workspace/att/breeze/System/core/node_modules/http-digest-client/http-digest-client.js:40:26
at ClientRequest. /home/yeudit/workspace/att/breeze/System/core/node_modules/http-digest-client/http-digest-client.js:29:12

the response header was:
Digest nonce="907419fb8e9c9d12e1270a7b7117b74c", opaque="510ed2366f84e2e3b5dcd95df026cdde", realm="me@kennethreitz.com", qop=auth

and the failure was because of the 'qop' parameter
https://github.com/simme/node-http-digest-client/blob/master/http-digest-client.js#L106

how can I prevent this failure? or maybe you have to add a fix?

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions